WASHINGTON — In 2006, when Edward J. Snowden joined the thousands of computer virtuosos going to work for America’s spy agencies, there were no recent examples of insiders going public as dissidents. But as his doubts about his work for the Central Intelligence Agency and then for the National Security Agency grew, the Obama administration’s campaign against leaks served up one case after another of disillusioned employees refashioning themselves as heroic whistle-blowers.

Instead of merely opting out of surveillance work, Mr. Snowden embraced their example, delivering hundreds of highly classified N.S.A. documents to The Guardian and The Washington Post. His act may have been a spectacular unintended consequence of the leak crackdown itself.

It may also have reflected his own considerable ambition, disguised by his early drifting. From Mr. Snowden’s friends and his own voluminous Web postings emerges a portrait of a talented young man who did not finish high school but bragged online that employers “fight over me.”

“Great minds do not need a university to make them any more credible: they get what they need and quietly blaze their trails into history,” he wrote online at age 20. Mr. Snowden, who has taken refuge in Hong Kong, has studied Mandarin, was deeply interested in martial arts, claimed Buddhism as his religion and once mused that “China is definitely a good option career wise.”