A search is presented for new Higgs bosons in proton-proton (pp) collision events in which a same-sign top quark pair is produced in association with a jet, via the pp→tH/A→ttc‾ and pp→tH/A→ttu‾ processes. Here, H and A represent the extra scalar and pseudoscalar boson, respectively, of the second Higgs doublet in the generalized two-Higgs-doublet model (g2HDM). The search is based on pp collision data collected at a center-of-mass energy of 13 TeV with the CMS detector at the LHC, corresponding to an integrated luminosity of 138 fb−1. Final states with a same-sign lepton pair in association with jets and missing transverse momentum are considered. New Higgs bosons in the 200–1000 GeV mass range and new Yukawa couplings between 0.1 and 1.0 are targeted in the search, for scenarios in which either H or A appear alone, or in which they coexist and interfere. No significant excess above the standard model prediction is observed. Exclusion limits are derived in the context of the g2HDM.