The castle was built between 1858 and 1867 as a birthday present by King George V of Hanover (reigned 1851–1866) to his wife, Marie of Saxe-Altenburg. Between 1714 and 1837 there had been virtually no royal court in Hannover as the House of Hannover had ruled the kingdoms of Hannover and Britain by personal union, and so the Castle was also built to serve as a suitable summer seat for the House of Hannover in Germany, besides the Royal Leine Palace and Herrenhausen Palace in Hannover.
Its architect was Conrad Wilhelm Hase, one of Hannover's most influential architects. Due to Hannover being annexed by Prussia in 1866, the castle was left uninhabited for 80 years after the royal family went into exile at Gmunden, Austria, where they lived in the Queen's Villa and, later, Cumberland Castle. Therefore Marienburg is well preserved, as few renovations were done until 80 years later when it was safe to come back. Ernest Augustus, Duke of Brunswick and his wife Princess Viktoria Luise of Prussia moved to Marienburg in 1945, when forced to leave Blankenburg Castle. In 1954 their son, Prince Ernest Augustus IV, opened the castle museum after having moved to nearby Calenberg Demesne.