Hanbury-Brown-Twiss (HBT) correlations for charged pions in central Au+Au collisions at √ s NN = 2.4-7.7 GeV (corresponding to beam kinetic energies in the fixed target frame from E lab = 1.23 to 30 GeV/nucleon) are calculated using the ultra-relativistic quantum molecular dynamics model with different equations of state (EoSs). The effects of a phase transition at high baryon densities are clearly observed in the explored HBT parameters. The results show that the available data on the HBT radii, R O /R S and R 2 O − R 2 S , in the investigated energy region favor a relatively stiff EoS at low beam energies, which then turns into a soft EoS at high collision energies consistent with astrophysical constraints on the high-density EoS of quantum chromodynamics (QCD). The specific effects of two different phase transition scenarios on R O /R S and R 2 O − R 2 S are investigated. A phase transition with a significant softening of the EoS below four times the nuclear saturation density can be excluded using HBT data. Our results highlight that the pion's R O /R S and R 2 O − R 2 S are sensitive to the stiffness of the EoS and can be used to constrain and understand the QCD EoS in a high baryon density region.