Mr. Powell appeared to be angry that NBC proposed that he appear on “Meet the Press” with Mr. Cheney and his daughter, who were promoting a book they wrote together. In the email, Mr. Powell said the network agreed to invite the Cheneys at a later date.

Mr. Powell’s emails appeared on a website called DCLeaks.com, which had previously posted documents that the site had obtained after hacks into the accounts of prominent Democrats and some Republicans, including Gen. Philip M. Breedlove, the former commander of NATO forces in Europe, and George Soros, a wealthy backer of liberal causes. It is unclear who operates DCLeaks.com.

Peggy Cifrino, an aide to Mr. Powell, responded Wednesday morning to an inquiry about the emails: “We are confirming that General Powell has been hacked and that they are his emails. We have no further comment at this time.” Mr. Powell did not respond to an email sent directly to his personal account.

In several emails, Mr. Powell suggested that speaking out against Mr. Trump would only add to the attention the Republican nominee was getting from the news media. Responding to a reporter asking for comment, Mr. Powell wrote last month that Mr. Trump is “his own best enemy” and added: “I will speak out when I feel it appropriate and not after every idiot thing he says.”

But the emails make clear that Mr. Powell, who also served as the chairman of the Joint Chiefs of Staff, has no intention of supporting Mr. Trump. In one back-and-forth with a former aide, Mr. Powell insisted that Mr. Trump should not be elected president.

“No need to debate it with you now, but Trump is a national disgrace and an international pariah,” Mr. Powell wrote in June, noting the criticism of Mr. Trump by several prominent conservatives. “He is in the process of destroying himself, no need for Dems to attack him.”

Mr. Powell also made clear in a series of exchanges how much he was offended by Mr. Trump’s attacks on the issue of Mr. Obama’s birth. “Yup, the whole birther movement was racist,” Mr. Powell wrote. “That’s what the 99% believe. When Trump couldn’t keep that up he said he also wanted to see if the certificate noted that he was a Muslim. As I have said before, ‘What if he was?’ Muslims are born as Americans everyday.”