Despite its importance to our understanding of physics at supranuclear densities, the equation of state (EoS) of matter deep within neutron stars remains poorly understood. Millisecond pulsars (MSPs) are among the most useful astrophysical objects in the Universe for testing fundamental physics, and place some of the most stringent constraints on this high-density EoS. Pulsar timing—the process of accounting for every rotation of a pulsar over long time periods—can precisely measure a wide variety of physical phenomena, including those that allow the measurement of the masses of the components of a pulsar binary system1. One of these, called relativistic Shapiro delay2, can yield precise masses for both an MSP and its companion; however, it is only easily observed in a small subset of high-precision, highly inclined (nearly edge-on) binary pulsar systems. By combining data from the North American Nanohertz Observatory for Gravitational Waves (NANOGrav) 12.5-yr data set with recent orbital-phase-specific observations using the Green Bank Telescope, we have measured the mass of the MSP J0740+6620 to be 2 .14-0.09 +0 .10 ? M⊙ (68.3% credibility interval; the 95.4% credibility interval is 2 .14-0.18 +0 .20 ? M⊙). It is highly likely to be the most massive neutron star yet observed, and serves as a strong constraint on the neutron star interior EoS.