Tests showed the white powder wasn't anthrax or any other lethal substance, but authorities had not determined what it was.
Prosecutors said Marc Harold Ramsey, 39, sent a letter to McCain's office in the south Denver suburb of Centennial reading, "If you are reading this, then you are already dead!"
The letter was signed Akeem Ramsey El, but the return address on the envelope had Ramsey's name and "Arapahoe County Detention Facility."
Ramsey, 39, is in the Arapahoe County jail awaiting trial on a charges of menacing, harassment and assaulting a peace officer.
U.S. Attorney Troy Eid said Ramsey told investigators he wrote the letter to express his views about the U.S. government.
"A death threat by no means is a legitimate form of political expression," Eid said.
Staffers at McCain's office opened the letter Thursday afternoon. At least 19 people were examined at hospitals or were quarantined outside the office.
A Colorado National Guard Civil Support Team determined the powder was not lethal at about midnight and everyone was sent home.
About 55 National Guard teams across the country respond to this type of incident. Three will be in Denver for the Democratic National Convention next week.
The teams respond to similar incidents about once a week, Guard spokesman Rick Breitenfeldt said. Thursday's letter received media attention because it involved a presidential candidate.
The Secret Service - which provides protection to the candidates
said a separate scare triggered by a letter sent to a McCain campaign office in Manchester, N.H., was a false alarm.
When the New Hampshire office received a letter with a Denver postmark, officials became concerned because they had heard about the Colorado letter.
Manchester police said the letter told McCain he would get support from Polish-American voters if he chose former New York Gov. George Pataki as his running mate.
Both the Colorado and New Hampshire offices were evacuated.
Anthrax has been in the news recently because the FBI announced it had a suspect in the 2001 deadly anthrax attacks. The suspect, Army microbiologist Bruce Ivins, killed himself July 29.