Frederick IV (Danish: Frederik; 11 October 1671 – 12 October 1730) was King of Denmark and Norway from 1699 until his death. Frederick was the son of Christian V of Denmark-Norway and his wife Charlotte Amalie of Hesse-Kassel.
Frederick was born on 11 October 1671 at Copenhagen Castle as the eldest son of King Christian V and his spouse Charlotte Amalie of Hesse-Kassel. The newborn prince was baptised the same evening with the name Frederick by the royal confessor Hans Leth. His grandfather King Frederick III had died a year and a half before he was born, and as the eldest son of the ruling King he was thus Crown Prince from birth. At the age of 18, he was given a seat on the Council of State as the heir apparent to the throne.
As Crown Prince, Frederick broadened his education by travelling in Europe, led by his chamberlain Ditlev Wibe. He was particularly impressed by the architecture in Italy and, on his return to Denmark, asked his father for permission to build a summer palace on Solbjerg, as the hill in Valby was then known, the future site of Frederiksberg Palace. The one-storey building, probably designed by Ernst Brandenburger, was completed in 1703.
Frederick was allowed to choose his future wife from a number of Protestant royal daughters in northern Germany. In 1695, he visited the court of Gustav Adolph, Duke of Mecklenburg-Güstrow in Güstrow. But his visit there was cut short by a message telling of his brother Prince Christian's serious illness (he had, in fact, already died in Ulm). Frederick later returned to Güstrow, where he was forced to choose the eldest of the unmarried princesses. On 5 December 1695 at Copenhagen Castle, he married Louise of Mecklenburg-Güstrow, herself a great-great-granddaughter of Frederick II of Denmark.
At the death of Christian V on 25 August 1699, the couple became King and Queen of Denmark-Norway. They were crowned on 15 April 1700 in the chapel of Frederiksborg Palace.
Frederick's most important domestic reform was the abolition in 1702 of the so-called vornedskab, a kind of serfdom which had applied to the peasants of Zealand since the Late Middle Ages.