In 1896, the post of High Commissioner for the Federated Malay States was created; the High Commissioner represented the British Government in the Federated Malay States, a federation of four British protected states in Malaya. The High Commissioner's official residence was King's House (now part of a hotel, Carcosa Seri Negara), located inside the Perdana Lake Gardens in Kuala Lumpur, the capital of the Federated Malay States. King's House served as an important place for royal dignitaries and distinguished guests.
The Governor of the Straits Settlements had always been ex-officio the High Commissioner for the Federated Malay States; the Governor's official residence was in Singapore, the capital of the Straits Settlements, and was known as Government House (now the Istana, official residence of the President of Singapore).
In each of the five protected states of Perlis, Kedah, Kelantan, Trengganu, and Johore (collectively referred to as the Unfederated Malay States), the British government was represented by an Adviser: the Adviser to the Government of Perlis; the Adviser to the Sultan of Kedah; the Adviser to the Government of Kelantan; the Adviser, Trengganu; and the General Adviser to the Government of Johore.
The Straits Settlements was dissolved in 1946. Singapore became a Crown colony in its own right. The rest of the Straits Settlements (i.e. Penang and Malacca) were merged with the Federated Malay States, Perlis, Kedah, Kelantan, Terengganu, and Johore to form the Malayan Union, another Crown colony. The native rulers in the Federated Malay States, Perlis, Kedah, Kelantan, Trengganu, and Johore ceded their power to the United Kingdom, thus turning these territories into British colonies. The new Crown colony of the Malayan Union was headed by a Governor – the Governor of the Malayan Union.
In 1948, the British government returned power to the native rulers of the former protected states, and the Malayan Union was transformed into the Federation of Malaya – a federation of protected states and Crown colonies (Penang and Malacca had remained Crown colonies throughout the Malayan Union era). The Federation of Malaya was headed by the High Commissioner for Malaya.
When Malaya gained independence from the United Kingdom, the position of the High Commissioner for Malaya as the de facto head of state was replaced by the Paramount Ruler, or the Yang Di-Pertuan Agong, of Malaya, appointed by the rulers of the nine Malay states. The title 'High Commissioner' became that of the senior British diplomat in the independent Malaya (and later in Malaysia), as is normal in Commonwealth countries.