Complicated many-body interactions between ions and surrounding particles exist in warm and hot dense plasmas. It will significantly alter the atomic structures and dynamic properties of the embedded ions. Recently, the atomic-state-dependent (ASD) screening model has been proposed and shown to be valid for investigating the screening effect in warm and hot dense plasmas over a wide range of electron densities and temperatures. By employing the ASD model, we investigate the photoionization process for the hydrogenlike carbon ion embedded in warm and hot dense plasmas with corresponding Coulomb coupling parameter ranges of 0.05 ≤ Γ ≤ 1.16, where Γ characterizes the ratio of the average potential to thermal energy. It is found that there are stronger plasma screening effects on the ionization energy and photoionization cross section due to the negative-energy electron distributions considered in the ASD model compared to those considering only free electrons. The present results from the ASD model show reasonable agreement with the classical Debye-Hückel (DH) model in weakly coupled plasmas. However, significant deviations of the ionization energy and cross section between these two models are observed in moderately and strongly coupled plasmas, due to the approximate treatment of the plasma-electron density distribution of the DH model. In the region of low photoelectron energies, the positions of the shape resonance peaks of the cross sections obtained from the ASD model differ significantly from those of the DH model due to the different screening effects.