Based on the atomic electron affinity EA, the average energy of the valence-shell electrons EI and the polarizability alpha, the charge effect and the relaxation effect were evaluated for the carbon 1s core ionization energies of halomethanes CHnY4-n-mZm (Y, Z=F, Cl, Br, I). The charge effect was scaled by the electronegativity discrepancy (the discrepancy of EA and the discrepancy of EI between the C and H or halogen atom in the C-H or C-halogen chemical bond). The relaxation effect (induced dipole) was scaled by the charge on the carbon atom together with the polarizability of the H and halogen atoms. Further, the electrostatic relaxation shielding DeltaSi of the carbon 1s electron in the halomethane was expressed by the charge effect together with the relaxation effect. By introducing DeltaSi into the Slater model, a Slater-like model was obtained for calculating the carbon 1s core ionization energy E1,C of halomethane, whose correlation coefficient r is 0.99985 and the average absolute error is only 0.041 eV between the calculated and the experimental carbon 1s core ionization energies for 27 halomethanes. Also the cross-correlation was tested by the leave-one-out (LOO) cross-validation method, and the obtained model has good predictive ability and stability (the correlation coefficient rcv is 0.99976, the average absolute error between the predicted and the experimental values is only 0.052 eV). The proposed model perhaps lays a good foundation for computing the core ionization energies of various atoms in more complex molecules.