A search for heavy pseudoscalar (A) and scalar (H) Higgs bosons decaying into a top quark pair (tt?) has been performed with 20.3??fb-1 of proton-proton collision data collected by the ATLAS experiment at the Large Hadron Collider at a center-of-mass energy s=8??TeV. Interference effects between the signal process and standard model tt? production, which are expected to distort the signal shape from a single peak to a peak-dip structure, are taken into account. No significant deviation from the standard model prediction is observed in the tt? invariant mass spectrum in final states with an electron or muon, large missing transverse momentum, and at least four jets. The results are interpreted within the context of a type-II two-Higgs-doublet model. Exclusion limits on the signal strength are derived as a function of the mass mA/H and the ratio of the vacuum expectation values of the two Higgs fields, tanβ, for