80% of all journals are not freely available—even though access to existing knowledge is crucial for pushing the research frontier. In this paper, we examine the impact of Sci-Hub, an online platform providing free access to scientific articles, on knowledge creation. Using data on 300 million geo-coded download requests, and the near-universe of scientific articles, we employ an instrumented difference-in-differences design. We find that Sci-Hub has significantly changed consumption patterns of scientific works, with a substitution of references from open- to closed-access publications. In turn, greater access to frontier knowledge resulted in higher-quality research output as measured by citations, but not more publications.