We use 500 pc resolution cosmological simulations of a Virgo-like galaxy cluster to study the properties of the brightest cluster galaxy (BCG) that forms at the centre of the halo. We compared two simulations; one incorporating only supernova feedback and a second that also includes prescriptions for black hole growth and the resulting active galactic nucleus (AGN) feedback from gas accretion. As previous work has shown, with supernova feedback alone we are unable to reproduce any of the observed properties of massive cluster ellipticals. The resulting BCG rotates quickly, has a high Sérsic index, a strong mass excess in the centre and a total central density profile falling more steeply than isothermal. Furthermore, it is far too efficient at converting most of the available baryons into stars which is strongly constrained by abundance matching. With a treatment of black hole dynamics and AGN feedback the BCG properties are in good agreement with data: they rotate slowly, have a cored surface density profile, a flat or rising velocity dispersion profile and a low stellar mass fraction. The AGN provides a new mechanism to create cores in luminous elliptical galaxies; the core expands due to the combined effects of heating from dynamical friction of sinking massive black holes and AGN feedback that ejects gaseous material from the central regions.