Tan lost touch with his family in 1942 after the Japanese invaded and occupied Singapore. He then joined Force 136, a branch of the Allied Special Operations Executive, where he met and befriended Lim Bo Seng. Tan participated in Operation Gustavus but was captured in 1944 by the Japanese when the operation failed. He spent the next 18 months in captivity, during which he was tortured by the Japanese, who attempted to force him to reveal the identities of other Force 136 members. He was released after the Japanese surrender in 1945. The Japanese killed Tan's elder brother, Tan Chong Mao, and their mother in the Sook Ching massacre.