A search for excited electrons produced in pp collisions at root s = 13 TeV via a contact interaction q (q) over bar -> ee* is presented. The search uses 36.1 fb(-1) of data collected in 2015 and 2016 by the ATLAS experiment at the Large Hadron Collider. Decays of the excited electron into an electron and a pair of quarks (eq (q) over bar) are targeted in final states with two electrons and two hadronic jets, and decays via a gauge interaction into a neutrino and a W boson (nu W) are probed in final states with an electron, missing transverse momentum, and a large-radius jet consistent with a hadronically decaying W boson. No significant excess is observed over the expected backgrounds. Upper limits are calculated for the pp -> ee* -> eeq (q) over bar and pp -> ee* -> e nu W production cross sections as a function of the excited electron mass m(e)* at 95% confidence level. The limits are translated into lower bounds on the compositeness scale parameter Lambda of the model as a function of m(e)*. For m(e)* < 0.5 TeV, the lower bound for Lambda is 11 TeV. In the special case of m(e)* = Lambda, the values of m(e)* < 4.8 TeV are excluded. The presented limits on Lambda are more stringent than those obtained in previous searches.