From RBKC document: "...the Royal Military Asylum for the Children of Soldiers of the Regular Army, which opened in 1803. Most of the thousand or so children were orphans; others had fathers serving overseas and some were just from large, poor Army families. The girls, who were trained for domestic service, were moved to Southampton in the 1820s but the boys, who were given military training, remained in Chelsea till 1909, when the school moved to Dover."
The foundation stone was laid in 1801. Called the Royal Military Asylum until 1892 when it was renamed The Duke of York's Royal Military School. Following the school's departure in 1909 the building became barracks known as the Duke of York’s Headquarters.The Ministry of Defence sold the whole site in 2003. Parts were redeveloped for high end accommodation. In 2007 Charles Saatchi moved his art collection into the main building.