At the 1935 Queensland state election, Walsh, a member of the Labor Party, defeated the Country and Progressive National Party candidate and future Prime Minister of Australia, Arthur Fadden, for the seat of Mirani in the Queensland Legislative Assembly.[5] He held Mirani until the 1947 state election when he was defeated by Ernie Evans of the Country Party.[6] As Walsh was the Deputy Premier of Queensland at the time, efforts were made to immediately find a safe Labor electorate for him[7] but in the end he had to wait until the 1950 state election to be back in the parliament, this time as the member for Bundaberg. He went on to represent the seat until his retirement in 1969.[1]
When the Premier of Queensland, Vince Gair, was expelled from the Labor Party over his refusal to obey party policy to grant three weeks annual leave for public servants, he, along with Walsh and most of the Ministry then formed the Queensland Labor Party and attempted to govern as a minority government but five weeks later lost a vote on supply and an election was called. Whilst Walsh kept his seat, both Labor parties suffered losses, and for the first time since 1932, a conservative government ruled Queensland. When the QLP amalgamated with the national Democratic Labor Party Walsh refused to support it and at the 1963 and 1966 state elections stood as an Independent.[2]
Whilst he was strongly anti-communist, he at first opposed banning the Communist Party of Australia, but in 1951 he supported the 'Yes' case in the Federal referendum.[2] In October 1944, Walsh engaged in a fist-fight with Tom Aikens, the newly elected Independent member for Mundingburra in the Speaker's lobby. When both members were ordered to appear before the Bar of the House to answer the charge of having created a disturbance, they tendered their apologies to the Parliament.[1]
While intensely loyal to his friends, he was extremely hostile to his enemies, of whom there were many. It was alleged that Walsh had a "little black book" in which a record of his fellow parliamentarians' indiscretions was kept for use in times of "trouble" and "difficulties". Nor was he averse to using his position to bestow gifts in the form of Golden Casket art union franchises.[2]
Walsh held several portfolios in the Labor Ministry, and they included:[1]
- Deputy Premier 1946–47 and 1957
- Treasurer 1952–57
- Minister for Transport 1944–47
- Minister for Public Lands 1940–44
- Acting Treasurer 1951–52