A flashback shows a young man who goes by He (Tony Leung) witnessing the final bombing of Guangzhou in 1938 in a makeshift mine alongside other survivors.
Shortly before the bombing of Pearl Harbor in 1941, the man rose into the ranks as the director of Shanghai’s Political Security Department, a counterespionage division overseen by Officer Watanabe. Despite showing loyalty to the Wang Jingwei regime, Director He secretly works for the Chinese Communist Party alongside his wife Ms. Chen (Zhou Xun). Together, they provide information to the underground network as a means of destroying Japanese occupation via espionage. Ms. Chen works alongside the party’s secretary Mr. Zheng (Huang Lei) and the former corresponds with her husband via pastries from a local bakery. As a supposedly loyal worker, Director He diligently performs his tasks of assassinating, interrogating, and torturing as a means of gaining Officer Watanabe’s trust.
Among Officer Watanabe’s inner circle is Minister Tang (Da Peng), Captain Wang (Eric Wang), and a young officer named Mr. Ye (Wang Yibo). Officer Watanabe is ambitious, believing he should do what he can to gain political power through the puppet government, yet suspicious of his men’s intentions. After secretly saving communist spy Ms. Jiang (Shuying) after she failed to assassinate Minister Tang, Director He is given information regarding important Japanese individuals such as a Japanese Prince currently serving within the military.
Peace negotiations were initially planned between Japan and the Wang Jingwei regime, which would redeploy Chinese forces to fight against the Soviet Union and allow the Wang Jingwei regime to continue fighting the Chinese Communist Party at the cost of (de facto) ceding Manchuria. With the newfound information, the Chinese Communist Party ambush and assassinate the Japanese Prince and his brigade during their last excursion. The event causes Japan to break off negotiations and the death of the prince compromises Officer Watanabe’s reputation.
Mr. Ye’s lover Ms. Fang (Zhang Jingyi), a dancer and member of the Chinese Communist Party lover, helps assassinate Minister Tang and breaks off her relationship with Mr. Ye, who angrily takes it out on random Japanese soldiers. He later finds out that Captain Wang raped and killed her due to her political affiliation, and Captain Wang mysteriously disappears soon after. Officer Watanabe becomes more suspicious of Director He after discovering he was cousins with Minister Tang and decides to use Mr. Ye as his double agent. The attack on Pearl Harbor is announced and the Wang Jingwei regime declares war on Great Britain and the United States, causing Shanghai to be completely occupied by the Japanese military. Mr. Ye becomes closer to Watanabe, who now wants to further his political ambitions with the former’s help.
Mr. Zheng fears the worst for himself and attempts to run away with Ms. Chen before discovering she was married the whole time. Only working for the Chinese Communist Party for money and possible peace, he decides to turn himself into Shanghai’s Political Security Department. Mr. Zheng unknowingly reports the Chinese Communist Party’s activities to Director He, who kills him, and visits his wife to check on her. Officer Watanabe orders Mr. Ye to take down Director He, and a bloody fight between the two ensues at Ms. Chen’s apartment. Mr. Ye returns to Officer Watanabe heavily injured but reports that Director He was arrested and Ms. Chen was killed. Officer Watanabe rewards Mr. Ye by making him his new secretary and showing the latter a map of territories and intel that would help strengthen Japan’s occupation of China via Manchuria. The two head to Manchuria to start their new political and military careers.
Director He is disguised as a political prisoner but is released soon after the Japanese surrender in 1945. As he leaves the prison, he sees a prison truck enter that includes Officer Watanabe and Mr. Ye among the incoming prisoners. Mr. Ye silently mock Director He as the truck drives through the gates and Officer Watanabe laughs when Director He tries to retaliate. In the prison’s washroom, Officer Watanabe tells Mr. Ye that he is no longer motivated to pursue any political power now that Manchuria is no longer under Japanese occupation, and wonders how Manchuria fell despite it being the best stronghold for Japan. He also contemplates on starting a new life from scratch as a farmer, attempting to take off his uniform in defeat, and says both would be granted immunity despite the crimes they committed. Mr. Ye, however, stops him and implies that Officer Watanabe should die as a Japanese officer.
It is revealed that Mr. Ye was double-crossing Officer Watanabe the whole time. At Director He’s orders, Mr. Ye intentionally gained Officer Watanabe’s trust and was working as a double agent for the Chinese Communist Party. Mr. Ye explains that Manchuria fell because of the information Officer Watanabe gave him in exchange for supposedly killing Ms. Chen and arresting Director He. Mr. Ye then kills Officer Watanabe with Director He’s knife before cleaning and returning the blade to its owner. Director He, waiting in the nearby office, thanks Mr. Ye for his hard work and efforts.
The movie reveals Ms. Chen was alive the whole time and she, Director He, and Mr. Ye are living unassuming lives in 1964 Hong Kong. Mr. Ye secretly buys coffee for Ms. Chen at a cafe before visiting a restaurant run by Captain Wang’s family. Captain Wang’s parents reveal that they escaped Shanghai after their son’s disappearance and believes their son is still alive in China. Mr. Ye leaves to avoid further suspicion from Captain Wang’s sister and he visits a nearby temple, running into Director He as he prays. Director He ultimately returns to Shanghai to see the bakery through which he corresponded with his wife still running and reminisces about how his life came to be.
The movie cuts back to Captain Wang confessing to Mr. Ye about Ms. Fang’s death. Initially never trusting Mr. Ye, Captain Wang attempts to shoot him but discovers that the latter had removed all the bullets from the gun. Mr. Ye then confesses that he is a Communist all along working for the Chinese Communist Party. Captain Wang is then killed by Mr. Ye, explaining the former’s apparent disappearance.