Moonesinghe was born in Colombo, Sri Lanka (then called Ceylon), on 15 February 1927. A member of the family of Anagarika Dharmapala (who named him 'Anil Kumar'), he was brought up with Buddhist and Sinhalese nationalist values, as well as an abhorrence of the colonial power, Britain.
He went to school at Royal College, Colombo, an elite institution which produced many radicals as well as civil servants and bourgeois politicians, where he won his colours in athletics. During the Second World War he organised a brigade of boys to aid the Japanese if they landed on the island and earned himself the nickname 'Rommel' at school. Later he became influenced by communism (he wrote in praise of the Red Air Force) and specifically by Trotskyism.
He went on to University College Ceylon (which later became University of Ceylon), where he excelled in athletics, representing his University at the All India Universities Athletic Meet, which was held regularly in those years, in Lahore in 1944. He taught briefly at Royal Primary School, which had been evacuated to Glendale Bungalow, Bandarawela. He won an exhibition to the University of London and went to Britain in 1945. He sailed on board a troopship; when the news of Churchill's defeat at the general election came through, all the soldiers on board threw their caps in the air and cheered, a fact which greatly encouraged him.
At University College, London, he studied law. There he met his future wife, Jeanne Hoban – a member of the Communist Party of Great Britain (CPGB) whom he converted to Trotskyism – and Stan Newens, who was later to become a Labour & Co-op MP. They joined the Revolutionary Communist Party (RCP), in which they were associated with the group around Tony Cliff, the so-called 'State-Caps' after their characterisation of the USSR as 'State-Capitalist'. The group later became the Socialist Workers Party (SWP). Through the group he got to know Max Shachtman,becoming familiar with his theory of 'bureaucratic revolution'. He was also familiar with Jock Haston and Ted Grant. Within the RCP he went by the Pseudonym 'Anil Kumaran'.
For a time he worked as an overhead crane operator at Southern Forge Ltd, Langley, Slough. He married Jeanne Hoban in 1948 and they moved into a houseboat called 'Red October', which they built together, on the Thames near Marlow. They both entered the Labour Party in Slough, on the heels of a group of the RCP, led by Jock Haston. Anil was a speaker for the National Council of Labour Colleges; while Jeanne was elected to the Executive of the Labour Leagues of Youth, later being put on the list of Labour Parliamentary candidates. They were both associated with the MP for Slough Fenner Brockway and with George Padmore, the prophet of Black African Liberation.
His parents summoned Anil back to Colombo urgently in 1952. He was called to the Bar and practised law all over the island. He and Jeanne joined the Lanka Sama Samaja Party (LSSP) and worked in the Lanka Estate Workers' Union (LEWU), which organised labourers on the tea and rubber plantations. At the time the British were still very powerful on the island, in spite of Ceylon having obtained a form of independence in 1948. The British planters prevailed upon the government to deport Jeanne, but she went into hiding and the LSSP fought successfully to prevent the deportation.
In 1954 the LEWU sent him to the Mohomediya Estate in Agalawatte, in the Pasdun Korale (county) to organise a strike there. He was so successful that the Agalawatte Local of the LSSP asked for him to be sent as the Party's parliamentary candidate for the constituency. At the time, the seat was held by the United National Party (UNP) with a comfortable majority (the plantation workers, who were a large minority of the electorate, were disenfranchised by the UNP Government in 1949). In 1956 he won the election for this seat in Parliament representing Agalawatte for 11 years. He worked hard for his constituency, building roads and schools through self-help and worked for the welfare of the poorest sections, particularly for the neglected so-called lower castes.
He also successfully contested the working-class Dematagoda Ward of the Colombo Municipal Council, but found that working in Agalawatte took up too much time for him to devote any to his ward work.
Together with Jeanne, he joined Sri Lanka's first co-operative housing scheme, the Gothatuwa Building Society, founded by Herbert Keuneman, Seneka Bibile, 'Bonnie' Fernando and other members of the radical intelligentsia. This led to the foundation of the Welikadawatte housing estate, which attained some fame as an island of intellectual creativity.
He was elected to the Central Committee of the LSSP and then onto its Political Bureau (Politburo), a position he never lost until he left the party. In 1956 he spoke in Parliament condemning the Soviet invasion of Hungary. In 1960, Yugoslavia opened an embassy in Colombo, and he advised the new ambassador unofficially on how to operate in Sri Lanka.
In 1963 he went to Yugoslavia for an Inter-Parliamentary Union conference. There he had an opportunity to view at close hand the operation of the Workers' Councils. He was deeply impressed by the level of open debate that he found at these councils, and this experience was to aid him in later years.
At the 1964 LSSP conference, he was aligned with Dr N.M. Perera on the question of whether or not to enter the Coalition Government of Mrs Sirimavo Bandaranaike. The Party did enter the Government and he became one of the first three Trotskyist cabinet ministers. He received the portfolio of Communications (Transport) and set to work to build up the country's transport resources. He established Employees' Councils to help run the Ceylon Government Railway and the Ceylon Transport Board (CTB). He obtained a large parcel of land in the centre of Colombo for establishing a Central Bus Station (CBS) in close proximity to the main Fort Railway Station. The construction of the new International Airport at Katunayake (a former RAF base which had been taken over in 1957) was also started by him. He negotiated an agreement with the FIAT company to build buses in Sri Lanka. However, the Government was defeated shortly thereafter and he was unable to complete his work – the next government did not sign the agreement with FIAT.
At the next general election, at which the coalition was defeated, he held his Parliamentary seat. However, in 1967 he lost it on an election petition, although the LSSP retained the Agalawatte seat at the subsequent by-election. He was editor of the daily Janadina newspaper for a short while around this time.
In 1966, the police arrested several lower-ranking soldiers and civilians, implicated in an alleged attempted coup d'état, the so-called 'Lavatory Coup'. Several army officers, including the Army Commander Major General Richard Udugama, were dismissed or suspended. Moonesinghe was lawyer for the 9th accused, Mayadunne, in the subsequent trial.
He visited Czechoslovakia during the 'Prague Spring' and was again impressed by the activities of the Workers' Councils there. He later wrote a book condemning the Soviet invasion which ousted Alexander Dubček.
He succeeded Dr N.M. Perera as President of the redoubtable All Ceylon United Motor Workers' Union (ACUMWU). He also set about organising the United Corporations and Mercantile Union (UCMU) which brought together workers in government corporations, and of which he was general secretary. He went around the country from factory to factory and built up a union of several tens of thousands of members. One of his lieutenants in this task was Vasudeva Nanayakkara, who became an MP in 1970. At the 1970 General Election, the UCMU also sponsored the candidature of novice Mahinda Rajapakse, who was the Chairman of its Vidyodaya University branch and who was later to become Prime Minister and then President of Sri Lanka.
After the 1970 election, at which the United Front (UF) won a landslide victory, the workers at the CTB spontaneously established workers' committees and took over the running of the institution. They also asked for Anil Moonesinghe to be made chairman of the board. The new Government therefore appointed him chairman and general manager. Thus began the most successful years of the CTB as an institution. For the last two of the five years he was there, the CTB ran at a profit, while providing a service which was never previously or subsequently matched. In this he was aided by his Minister, Leslie Goonawardena.
Senior citizens still nostalgically refer to the CTB under Moonesinghe, which provided an efficient and disciplined service to the public. He would dress in a bush shirt and trousers and operate as a one-man flying squad to catch errant bus crews in the act, lying in wait in his metallic blue Volkswagen Variant or his Citroën 2CV at places like Dematagoda Junction to prowl on them.  Stories would abound (all untrue) of him being spotted disguised with a beard. To prove that eight buses could be serviced in a day, he once personally carried out eight vehicle services at the Central Workshops, Werahera.
In addition to the role in management of the Employees' Councils (which the workers' committees were transformed into after being properly constituted, with democratic elections supervised by the Elections Commission), commuter organisations were included in an advisory role. The services were expanded and measures were taken to improve efficiency, including rationalising bus types. The CTB started buying buses from the Isuzu Company of Japan, to offset any cartelisation by Tata and Ashok Leyland, the main suppliers, and also purchased Ikarus buses from Hungary. Several new bus stands and bus depots were established. A modern, multi-storied bus station was planned at the CBS, complete with hotel and cinema, but this would never be completed.
Moonesinghe also took measures to build up local industry and the CTB became well equipped with foundries and workshops: the Central Workshop at Werahera became the largest in South Asia. The local modification of ticket machines was started after employees pointed out many unsuitable features, and a new workshop was acquired for this. In 1974 he started the assembly of bus chassis and prototypes of a locally manufactured bus and a car rolled out of Werahera.
In 1971, when the Janatha Vimukthi Peramuna (JVP – People's Liberation Front) staged an insurrection, he formed a 2,000-strong para-military body, the Hansa Regiment (of which he was honorary Colonel), from among the employees of the CTB to guard bus depots, bus stands and workshops. He also created 'CANTAB', a secret intelligence organisation, the agents of whom were employees of the CTB, which provided accurate reports of the strength and distribution of JVP units. JVP cadres would prefer to surrender to the Hansa Regiment as this was known not to execute or torture prisoners.
At this time he joined the editorial board of 'State', a theoretical journal of the LSSP, published in three languages.
In 1975, Leslie Gunawardena and he were preparing the ground for a major shift in the management of the CTB, whereby Employees' Council representatives were to form half the board of directors. However, in September that year the UF broke up and the LSSP Ministers were removed, so Anil resigned from the CTB.
He was briefly employed at this time, by the Government of Guyana, as a consultant on transport.
He contested the 1977 election for the Matugama constituency, which lay next to Agalawatte. He was narrowly beaten into third place by the sitting member of the SLFP. He became deputy secretary of the LSSP in 1978, having supported the group led by NM Perera at that year's conference. In 1980, he was arrested for his part in the General Strike, but later released without any charges being made. At this time he wrote a book on the repression of the Solidarity union in Poland.
About this time, he coined the term 'Casino Capitalism' to describe the economic set-up under the UNP regime. 
He split from the LSSP in 1982 over its refusal to go into coalition with Mrs Sirimavo Bandaranaike's Sri Lanka Freedom Party (SLFP), forming the Sri Lanka Sama Samaja Party (SLSSP) with other breakaways. He supported Hector Kobbekaduwa at the Presidential Election of that year. In 1983 the SLSSP dissolved itself and he joined the SLFP and contested the Matugama seat at a by-election and won. He represented Matugama until 1989 and then was one of the MPs – under proportional representation – for the Kalutara District until 2000. During the 1983 anti-Tamil pogrom, he intervened to save several people from death. During the 'White Terror' of 1988–90, he was active in saving hundreds of suspects from summary execution – at one point having to threaten an Army commandant with attack.
In the early 1990s he was elected a vice-president of the SLFP and was part of a re-organisation drive led by Anura Bandaranaike, DM Jayaratne, Berty Premalal Dissanayake and Mahinda Rajapakse.
In opposition, he was the spokesperson for Transport (he was also President of the Sri Lanka National Transport Workers' Union) and, being acknowledged as the best man to take care of the public transport sector, was expected to receive that portfolio in the event of the SLFP returning to power. However, after the victory in 1994 of the People's Alliance, the new Prime Minister, Chandrika Kumaratunga did not care to revive the CTB and did not make Moonesinghe a Minister.
Instead, he became Deputy Speaker and Chairman of Committees of Parliament. Soon after this, he was elected President of the Mahabodhi Society, a Buddhist Missionary organisation headquartered in Colombo.
He was disoriented by the rather Byzantine internal politics of the SLFP. In the LSSP debate was out open and was democratic, with matters being finally settled with a vote. His habit of speaking his mind, which had only irritated others in the LSSP, proved to be a liability in his new political home. After becoming Deputy Speaker, he grew close to Mrs Bandaranaike, who had herself been deserted by many of her closest allies. Her death affected him deeply.
In 2000 he was appointed Sri Lanka's Ambassador to Austria, the UN and accredited to the former Yugoslav republics, Hungary, the Czech republic and Slovakia. On 14 March 2002 he presented his credentials as the first Sri Lankan Ambassador to Croatia. He had a close relationship with Václav Havel, the President of the Czech Republic, due to his connections with the oppositional movement in Czechoslovakia since the Prague Spring.
After the victory of the UNP at the general election of December 2001, he was recalled.
He died on 8 December 2002 in Colombo. He left four children, Janaki, Vinod, Previn and Priyanka, the last two by a second marriage to Joan de Zilva.Kumaran, Anil (pseudonym), "The Indonesian Movement", Workers’ International News, January–February 1949.
Moonesinghe, Anil, Chekoslovækiyava, Janadina Publications, Colombo, 1968.
Moonesinghe, Anil, Polanthaya – 1980, Janadina Publications, Colombo, 1980.