Entanglement is an intrinsic property of quantum mechanics and is predicted to be exhibited in the particles produced at the Large Hadron Collider. A measurement of the extent of entanglement in top quark-antiquark ( t t ¯ ) events produced in proton-proton collisions at a center-of-mass energy of 13 TeV is performed with the data recorded by the CMS experiment at the CERN LHC in 2016, and corresponding to an integrated luminosity of 36.3 fb−1. The events are selected based on the presence of two leptons with opposite charges and high transverse momentum. An entanglement-sensitive observable D is derived from the top quark spin-dependent parts of the t t ¯ production density matrix and measured in the region of the t t ¯ production threshold. Values of D < − 1 / 3 are evidence of entanglement and D is observed (expected) to be − 0.480 − 0.029 + 0.026 ( − 0.467 − 0.029 + 0.026 ) at the parton level. With an observed significance of 5.1 standard deviations with respect to the non-entangled hypothesis, this provides observation of quantum mechanical entanglement within t t ¯ pairs in this phase space. This measurement provides a new probe of quantum mechanics at the highest energies ever produced.