During his military service, Allen was imprisoned for assault, where a fellow inmate introduced him to the ideals of Socialism. He was a passionate socialist for the rest of his life, although he detested Stalinism and refused to be associated with the Communist Party of Great Britain. In 1958 Allen joined the Socialist Labour League (SLL, the forerunner of the Workers' Revolutionary Party) led by Gerry Healy, a small group then pursuing entryist tactics within the Labour Party. The SLL objected to the close association between the CPGB and the National Union of Mineworkers, and Allen was a prominent campaigner for the league. In 1962, the Labour Party declared the SLL to be a "proscribed organisation", leading to Allen's expulsion from the party. He subsequently resigned his membership of the league, and was not associated with any recognised political party thereafter.

Allen began to write during his time as a miner. In 1958, he was involved in the launch and publication of The Miner,[1] which actively recruited for the SLL. The proscription of the SLL, together with the closed shop system of the time, made it impossible for him to find work in the mining or building trades, and he decided to adopt writing as a full-time profession. In 1964, he submitted a script to Granada TV, and was taken on as a scriptwriter for the soap opera Coronation Street (1965–67), a series for which he had little sympathy. His later play, The Talking Head (1969), recounts the experience of a talented writer driven to a nervous breakdown by the pressure of "episode delivery dates".[2]

Allen's first play, The Hard Word (1966), directed by Ridley Scott,[2] was broadcast as part of the Thirty-Minute Theatre series on BBC 2. It was followed by The Lump (1967), the first fictional work directed by Jack Gold, who had begun his career on documentaries,[3] and broadcast as part of The Wednesday Play drama anthology series. Both plays were based on his experiences in the building trade, and The Lump features an activist worker who frequently quotes Lenin and Jack London, establishing the political nature of Allen's work which was to continue throughout his career.

Allen was introduced to Ken Loach in 1967 by Loach's regular collaborator at the time, producer Tony Garnett,[4] who had produced The Lump. The first of Allen's plays to be directed by Loach was The Big Flame (1969), again for The Wednesday Play series. The play depicts a strike among the dockers of Liverpool, led by a Trotskyite docker against the wishes of the established union; the strike is violently broken by the army and police.

In 1975, Allen wrote, Garnett produced, and Loach directed Days of Hope, Allen's best-known work. A serial of four episodes, it tells the story of the British Labour movement between the end of the Great War in 1918 and the General Strike of 1926. The series' depiction of the British Army was the subject of much hostile criticism in the press at the time.

Allen also wrote five plays (The Rank and File (1971), A Choice of Evils (1977), The Spongers (1978), United Kingdom (1981) and Willie's Last Stand (1982)) for the BBC's Play for Today drama series, and several episodes of the Granada series Crown Court (1975–76).

Allen and Loach's most controversial project was Allen's stage play, Perdition. Presented as a courtroom drama, the play dealt with an allegation of collaboration between Hungarian Zionists and the Nazis during the Holocaust. The play was due to open at the Royal Court Theatre in January 1987, but was cancelled 36 hours before the opening night; the script was read in public at that year's Edinburgh Festival. Lord Goodman wrote in the Evening Standard on 23 January 1987: "Mr Jim Allen's description of the Holocaust can claim a high place in the table of classic anti-Semitism."[5] The work was not produced as a stage play until 1999.

With Loach as director, Allen wrote the screenplays for three feature-length films: Hidden Agenda (1990), which portrays the murder of an American civil rights activist in Belfast, Raining Stones (1993), a kitchen-sink tragicomedy set in Middleton, near Manchester, and, Allen's final dramatic work, Land and Freedom (1995), telling the story of an idealistic young Communist from Liverpool who joins the Government forces in the Spanish Civil War.