Bletchley Park Post Office said new management at the Buckinghamshire museum had decided it was no longer "core to the codebreaking story".
It became a post office in 1947 and was the museum's first gift shop when it opened to the public in 1994, issuing limited edition stamps.
A museum spokeswoman said it would close by June.
"Naturally the volunteers who kept it running since Bletchley Park opened in 1994 are disappointed by the decision, but understand that Bletchley Park Trust wish to focus on the core story of World War Two codebreaking," she said.
Bletchley Park was the wartime home of the Government Code and Cypher School.  It broke codes generated by the Enigma machine, a device used by the Germans to send encrypted messages.
In 1947, the General Post Office turned the house into a training centre and the mailroom became a sub-post office.
After the training centre was closed, Royal Mail allowed the trust to try to save Bletchley Park from demolition to keep the post office.
Terry Mitchell, who has helped run it ever since, said: "The volunteers are disappointed, but we understand the background of what Bletchley Park is trying to do."
About 20 volunteers staff it, seven days a week. Some will now leave the museum, but others have asked to be deployed elsewhere.
Mr Mitchell thinks it must have raised "a couple of hundred thousand pounds or more" over the years, from issuing limited edition postage stamps.
Recent issues include stamps celebrating the Bombe codebreaking machine, which was used to crack the Enigma code, and Alan Turing, who helped its development.
Mr Mitchell said: "Saving Bletchley Park was our objective in 1994, we did not set out to run a post office, so it had to have a finite life."
The former undercover mailroom for World War Two codebreakers that later became a post office is to close.