He made the comment in a 1971 telephone call with then-President Richard Nixon.
Mr Reagan, who was governor of California at the time, was angered that African delegates at the UN sided against the US in a vote.
Members of the Tanzanian delegation started dancing after the UN voted to recognise China and expel Taiwan.
Mr Reagan, who was a supporter of Taiwan, called the president the following day to express his apparent frustration.
He said: "To see those... monkeys from those African countries - damn them, they're still uncomfortable wearing shoes!"
The recording was unearthed by Tim Naftali, a clinical associate professor of history at New York University, who directed the Nixon Presidential Library from 2007 until 2011.
But he said the recordings were ordered to be reviewed following a court order. "Reagan's death, in 2004, eliminated the privacy concerns," Mr Naftali said.
"I requested that the conversations involving Ronald Reagan be re-reviewed and, two weeks ago, the National Archives released complete versions," he added.
According to Mr Naftali, Mr Reagan called Mr Nixon to press him to withdraw from the UN. But the president later said Mr Reagan's "complaints about Africans became the primary purpose of the call".
Mr Naftali also said the president later told his secretary of state that Mr Reagan had described the Tanzanian delegation as "cannibals" that "weren't even wearing shoes".
Mr Reagan publicly defended the apartheid states of Rhodesia and South Africa in the 1970s, and Mr Naftali said the newly-revealed recording "sheds new light" on this stance.
He served as president from 1981 to 1989, at a time marked by the climax of the Cold War and the beginning of the end of Soviet communism. He died in 2004 aged 93 after a long battle with Alzheimer's disease.