The boys, who are 9 and 12 years old and from Germany, dug a hole in the sand and then suddenly disappeared.
According to Danish TV2, it took 40 minutes to dig out the boys from the sand, which several volunteers initially helped with before a tractor with a digging scoop was on site.
I think there were 25 people shoveling away sand, says rescue leader Benny Bak to TV2.
The boys were then taken to hospital by helicopter. According to the Danish police, they were lifeless when they were dug out and their condition is now described as critical.
Thy national park is a popular tourist destination known for its beaches and sand dunes. On Monday, the local rescue service warned against digging holes in the sand.