The school has its origins in five educational charities founded in the 17th Century. The first, resulting from a petition to Elizabeth I by Ann Sackville, Lady Dacre, in 1590, was granted its Charter of Incorporation in 1601 and eventually led to the establishment of the Brown Coat School (now Emanuel School) in 1736. The site of the original Emanuel Hospital is now occupied by the St. James Court Hotel in Buckingham Gate, and Westminster City School is located in the former gardens of the Hospital.
In 1624 the Churchwardens of St. Margaret's, Westminster, established St. Margaret's Hospital to which Charles I granted a Charter of Incorporation in 1633. As the children of St. Margaret's were dressed in green, the Hospital became known as The Green Coat School. St. Margaret's Hospital was sited near the present Green Coat Place and "The Green Coat Boy" public house.
Another charity was established in Westminster in 1654 by the Reverend James Palmer who had been the Vicar of St. Bride's Church, Fleet Street. He erected twelve almshouses and a school house for "the education of 20 poor male children born within the parish of St. Margaret". After fluctuating fortunes the school was closed less than ten years later, to be re-opened in 1671 as the Black Coat Hospital which survived as a school until 1728 in what is now Palmer Street. The school's fitful existence was matched by that of a similar forerunner of Westminster City School, the Emery Hill foundation. Emery Hill, Churchwarden of St. Margaret's Church, founded his school in 1674 but in practice nearly 150 years elapsed before it began to operate. In 1817 both Palmer's (Black Coat) and Emery Hill's schools were revived and continued until 1873 when a scheme for the establishment of the United Westminster Schools was approved by Queen Victoria. Emery Hill's school and almshouses were located in Rochester Row, where the almshouses still operate.
The United Westminster Schools now consist of Emanuel School in Wandsworth, Sutton Valence School in Kent and Westminster City School. In 1909 the Blue Coat charity school (founded in 1688) closed and the charity's total funds were divided between The Grey Coat Hospital and the United Westminster Schools. Thus Westminster City School, an amalgamation of the Brown Coat, Green Coat and Black Coat schools, shared with The Grey Coat the inheritance from the Blue Coat School. The Blue Coat School building has been preserved in Buckingham Gate where it is now a National Trust shop.