This paper investigated the impact of Co ions doping on the structure, magnetic properties, and magnetocaloric effect for La0.8Sr0.2Mn1-xCoxO3 ceramics (LSMCO) by sol-gel method and first-principles calculations The use of first-principles calculations was provided for subsequent experiments. The sol-gel preparation of LSMCO ceramics and sintered at 950 °C for 10 h. It was shown that the samples' cell volume and lattice constants changed slightly with increasing Co2+ doping but remained a rhombohedral structure (No.167, R-3c space group) by statistics of TEM and XRD. The average particle size for the LSMCO ceramics ranged from 130 nm to 170 nm. LSMCO's chemical composition was verified by EDS and XPS and it was demonstrated that Co2+ was successfully doped. The oxidation state of La was found to be +3, Mn is a mixture of Mn3+ and Mn4+ valence states, and Co is a mixture of Co3+ and Co2+ valence states using XPS. In the vicinity of Tc, all samples presented the second-order magnetic phase transition from ferromagnetic to paramagnetic resorting to normalization and the Banerjee criterion. The Tc dropped from 292 K to 237 K with increasing Co2+ doping. The blocking temperature and the saturation magnetization were suppressed by the Co2+ substitution while the maximum magnetic entropy change of the LSMCO ceramics was observed to reduce as Co2+ increased. When the external magnetic field is 5 T, the La0.8Sr0.2Mn0.95Co0.05O3 ceramics has a Tc of 292 K and a maximum magnetic entropy change value of 3.47 J/(kg K).