Cotter grew up in Liverpool, where he became a ships steward with the Cunard Line. In 1909, he believed that foreign workers were taking the jobs of British workers on ships, and began campaigning against them, an activity for which he was sacked. In response, Cotter founded the Ships' Stewards, Cooks, Butchers, and Bakers Union, of which he became secretary. As he was the dominant figure in the union, it was generally known as "Cotters' Union". He also became vice president of the Liverpool Trades Council.
Around 1910, Cotter identified as a syndicalist, and he and Frank Pearce from the union both joined the Industrial Syndicalist Education League (ISEL). The union played a prominent part in the Seamen's Strike of 1911, working closely with Tom Mann of the ISEL, and the National Sailors' and Firemen's Union (NSFU), and obtained recognition by the Shipping Federation.
Cotter became known for his lively speeches and tendency to incautious action, and was nicknamed "Explosive Joe". He continued to oppose non-British workers, claiming that Chinese workers were invading Britain in an analogy to the German threat during World War I.
When the National Maritime Board declared that it would cut wages by £2.10 a month in May 1921, Cotter led a strike. However, this was unsuccessful, as the NSFU were willing to take ships out with strikebreakers in place of the ships' stewards. The union went into a rapid decline, and in 1922 it merged with the British Seafarers' Union (BSU) to form the Amalgamated Marine Workers' Union (AMWU). Cotter became the new union's president, and by the end of the year had succeeded Manny Shinwell as the union's full-time national organiser.
During this period, Cotter was a prominent public figure. In 1920, he was made an Officer of the Order of the British Empire, in 1923/4 he served on the General Council of the Trades Union Congress (TUC), and by 1924, he was serving on the National Maritime Board. He became active in the Labour Party, and unsuccessfully contested South East Essex at the 1918 UK general election, Birmingham Aston in 1922 UK general election, and Widnes at the 1923 and 1924 UK general elections, without success.
The AMWU was not effective, with numerous disputes arising between the former members of the two unions. Matters came to a head in 1925, when the union made redundant five former BSU employees, and Cotter and Shinwell verbally attacked each other at a union meeting. With the encouragement of the TUC, Cotter began working closely once more with the NSFU, and took up an offer of employment from that union in August. He announced that the AMWU had dissolved into the NSFU, which was renamed as the National Union of Seamen (NUS), but he did not have the authority to order the merger. Instead, Cotter switched to arguing that the merger between the BSU and the Ship Stewards was illegal, as the Ship Stewards had held a fraudulent ballot. This argument prevailed in court, and the AMWU was prohibited from accessing the assets of the former Ship Stewards' Union, which formed the majority of its own assets. As a result, the union dissolved in 1927.
By this time, Cotter was having problems in the NUS; its president, Havelock Wilson, opposed the 1926 UK general strike, and donated more than £3,000 of union funds to a new anti-strike miners' union. Cotter opposed this, and Wilson believed that Cotter was conspiring with general secretary William J. Davies to take over Wilson's position. Wilson fired Cotter, Davies and seven other union officials in September 1927, and the NUS was expelled from the TUC. Cotter led the fired officials in taking the NUS to court, arguing that the donation was ultra vires, but lost the case.