Just before World War II, Welchman was invited by Commander Alastair Denniston to join the Government Code & Cypher School at Bletchley Park, in case war broke out. He was one of four early recruits to Bletchley (the others being Alan Turing, Hugh Alexander, and Stuart Milner-Barry), who all made significant contributions at Bletchley, and who became known as 'The Wicked Uncles'. They were also the four signatories to an influential letter, delivered personally to Winston Churchill in October 1941, asking for more resources for the code-breaking work at Bletchley Park. Churchill responded with one of his 'Action This Day' stickers.

Welchman envisaged an enhancement to Alan Turing's improved design of the Polish electromechanical Enigma-cipher-breaking machine, the bombe. Welchman's enhancement, the 'diagonal board', rendered the device substantially more efficient in the attack on ciphers generated by the German Enigma machine. Bombes became the primary mechanical aid in breaking Enigma ciphers during the war, by speeding up the search for current settings being used with the Enigma machines; these were changed often, initially at least once per day.
Welchman was head of Hut Six, the section at Bletchley Park responsible for breaking German Army and Air Force Enigma ciphers. In 1943 he became Assistant Director in charge of mechanisation, and also had responsibility for cryptographic liaison with the USA.

Hut 6 where the Enigma code was broken

Welchman moved to the United States in 1948, and taught the first computer course at MIT. He followed this by employment with Remington Rand and Ferranti. He became a naturalised American citizen in 1962. In that year, he joined the MITRE Corporation, working on secure communications systems for the US military. He retired in 1971, but was still retained as a consultant. In 1982, McGraw-Hill published his book The Hut Six Story in the USA, the British version being published by Allen Lane.

The book was frowned on by the National Security Agency, and its author lost his security clearance (and therefore his consultancy with MITRE), and was forbidden to discuss his book or his wartime work with the media. The offending book was, however, not banned. His final conclusions and corrections to the story of wartime codebreaking were contained in a paper published posthumously in 1986 (Welchman having died in 1985) 'From Polish Bomba to British Bombe: the birth of Ultra' in Intelligence & National Security, Vol 1, No l. The entire paper was included in the revised edition of The Hut Six Story published in 1997 by M & M Baldwin.
He was survived by three children, two stepchildren, and eight grandchildren.