A search is performed for the pair production of spin-3/2 excited top quarks, each decaying to a top quark and a gluon. The search uses the data collected with the CMS detector from proton–proton collisions at a center-of-mass energy of 13 TeV, corresponding to an integrated luminosity of 35.9 fb−1. Events are selected by requiring an isolated muon or electron, an imbalance in the transverse momentum, and at least six jets of which exactly two must be compatible with originating from the fragmentation of a bottom quark. No significant excess over the standard model predictions is found. A lower limit of 1.2 TeV is set at 95% confidence level on the mass of the spin-3/2 excited top quark in an extension of the Randall–Sundrum model, assuming a 100% branching fraction of its decay into a top quark and a gluon. These are the best limits to date in a search for excited top quarks and the first at 13 TeV.