A respected Harvard researcher who also is an Internet folk hero has been arrested in Boston on charges related to computer hacking, which are based on allegations that he downloaded articles that he was entitled to get free.

A federal indictment unsealed in Boston on Tuesday morning on charges that the researcher, Aaron Swartz, broke into the computer networks at the Massachusetts Institute of Technology to gain access to JSTOR, a nonprofit online service for distributing scholarly articles online, and downloaded 4.8 million articles and other documents — nearly the entire library.

Mr. Swartz, 24, made his name as a member of the Internet elite as a teenager when he helped create RSS, a bit of computer code that allows people to receive automatic feeds of online notices and news. Since then, he has emerged as a civil liberties activist who crusades for open access to data.

In 2008, Mr. Swartz released a “Guerrilla Open Access Manifesto,” calling for activists to “fight back” against the sequestering of scholarly papers and information behind pay walls.