In 1901 Swettenham was appointed governor of the Straits Settlements, a post particularly agreeable to one so socially ambitious. Much of his time as governor was spent in negotiations with the Siamese over the absorption of the states of Kelantan and Trengganu into the British sphere of influence. In this he failed, partly because of personal arrogance in his dealings with senior Siamese officials, and partly because he underestimated the importance for Franco-British relations of retaining Siam as an independent buffer state.
Increasingly public estrangement from the rulers, continuing blackmail, the prospect of a lucrative personal deal with the sultan of Johore over the routing of the railway through that state, combined with evidence received of his wife's adultery and the prospect of divorce, persuaded Swettenham to retire prematurely in 1904. His divorce proceedings failed, and the land in Johore proved less profitable than anticipated. In retirement Swettenham hastened to offer unsolicited advice to the Colonial Office, and endeavoured with only modest success to establish himself as the leading authority on colonial matters, chiefly through newspaper correspondence.
His personal interpretation of Malay history was portrayed in his British Malaya: an Account of the Origin and Progress of British Influence in Malaya, first published in 1907. This, though marked by obsolete scholarship, remained through several editions the primary textbook on the subject until the 1950s. Finally, aged ninety-one, he published his autobiography, Footprints in Malaya (1942).