Born in 1898, Megarry was educated at the Royal Academical Institution, Belfast, and Trinity College, Dublin, where he graduated BA with First Class Honours in Classics and Philosophy. He was appointed as an Eastern Cadet in the Colonial Service in November 1922 and arrived in Hong Kong in December 1922 as a new Cadet in the government administration, on board a ship called City of York, for an initial salary of £250 a year. He became a long-time civil servant in the colonial administration of Hong Kong, and in January 1933 was appointed as the head of the Sanitary Department, in place of G. R. Sayer. He was District Officer for the Northern District of the New Territories and acted as Magistrate presiding over the Small Debts Court in the New Territories on several occasions in the 1930s. In 1936, he was appointed Deputy Clerk of Councils and in 1937 he was the Superintendent of Imports and Exports. On the eve of the Japanese occupation, he was the Principal Assistant of the Colonial Secretary and was interned during the occupation.
Megarry acted as the Secretary for Chinese Affairs in the early post-war Hong Kong and was appointed Official Member of the Executive Council of Hong Kong in 1947. He perceived that Chiang Kai-shek's Kuomintang government on the Mainland China had increased significant influence in Hong Kong during the Japanese occupation, much larger than in reality, by enlisting Triad members to subversive activities against the Japanese. He believed that Kuomintang attempted to influence and control by "systemic blackmail" the Hong Kong newspapers and to dominate the seamen's unions by supporting the unions in labour disputes. Megarry suggested Governor Mark Aitchison Young to buy off the Triad bands in order to counter the Kuomintang influence. The observations of Megarry made Young worried about his proposed democratic reform which would invite infiltration of the Kuomintang. The plan was eventually turned down by Young's successor, Alexander Grantham.
Megarry also became the first chairman of the Public Service Commission, a principal statutory advisory body to the Governor on civil service appointments, promotions and discipline, on 3 August 1950 with two members John Roberts Jones and Sir Man Kam Lo. He served on the commission until March 1951 and replaced by Justice Ernest Hillas Williams. At the same time, he retired.
- The Colonial Office List 1949 (H.M. Stationery Office, 1949), p. 507
- The London Gazette dated 2 November 1922, p. 7803
- Alexander Grantham, Via Ports: From Hong Kong to Hong Kong, pp. 3-4
- "MR. T. MEGARRY TO BE HEAD OF SANITARY DEPT". Hong Kong Daily Press. 16 January 1933. p. 9.
- "Hong Kong Government Gazette" (PDF). 27 March 1931. p. 183.
- "Hong Kong Government Gazette" (PDF). 31 December 1936. p. 1275.
- "Hong Kong Government Gazette" (PDF). 19 February 1937. p. 132.
- "Hong Kong War Diary". Hong Kong War Diary.
- "No. 37984". The London Gazette. 13 June 1947. p. 2673.
- Louis, William Roger (2006). Ends of British Imperialism: The Scramble for Empire, Suez, and Decolonization. I.B.Tauris. p. 357.
- Public Service Commission Annual Report (PDF). Public Service Commission.
- Far Eastern Economic Review, Volume 15 (Review Publishing Company Limited, 1953), p. 285