In a statement, the royal household said that Margrethe, 82, who has been on the throne for 50 years, canceled her official duties after the Tuesday night test.
The palace said her oldest son, heir to the throne Crown Prince Frederik, and his wife, Crown Princess Mary, would would take the queen's place hosting a dinner with Danish government officials and members of parliament.
Margrethe previously tested positive for the virus in February. At the time, the palace said she had received three doses of a COVID-19 vaccine. The queen was among the dignitaries who attended Queen Elizabeth II's funeral Monday at Westminster Abbey in London.
Margrethe's half-century reign makes her Europe’s longest-serving monarch following the Sept. 8 death of Elizabeth, 96, who ruled for 70 years.
Out of respect for the late British monarch, Margrethe had asked her court to adjust the Sept. 10-11 program for her own 50-year anniversary commemorations. Among the events she canceled at short notice was appearing on the Amalienborg Palace balcony to greet well-wishers and a ride in a horse-drawn carriage through Copenhagen.
Margrethe was proclaimed queen on Jan. 15, 1972, a day after her father, King Frederik IX, died following a short illness.