Nowadays, converting and storing solar energy is crucial in contemporary society. Thermal energy storages (TESs) can be vital in harnessing solar energy effectively. Phase change materials (PCMs) are favorable candidates for TESs owing to the smoothing outcome and, thus, increasing reliability. However, these materials suffer from limited thermal conductivity, inadequate light absorption, and high leakage during phase transition. In the present study, a facile and scalable graphitized carbon foam/Ni nanoparticles composite with exciting properties such as excellent light adsorption and high thermal conductivity was prepared as a platform to overcome the PCMs challenges. To obtain this composite, the coated commercial melamine foams (CMF) with an ethanolic solution containing the phenolic resin and NiCl2.6H2O were pyrolyzed at 900 degrees C. The composite foam (CNiF) was utilized as a framework for paraffin (PA), which was soaked in melted PA at 75 degrees C under the vacuum drying oven for 50 min (CNiF/PA). The prepared black and magnetic composites exhibited high photo-to-thermal energy efficiency of 66, 80, and 92 % under light intensities of 900, 1000, and 1100 W/m2, respectively. In addition, the composite controls voltage fluctuations and prevents voltage drops in thermoelectric generators (TEGs) in solar thermal systems. The output voltages were 0.51, 0.63, and 0.81 V under light intensities of 1500, 1800, and 2100 W/m2, respectively. Moreover, the magnetically moving magnetic carbon foam solar absorber within the molten PA along the solar illumination path dramatically enhances the speed of solar-thermal energy storage. The set-up was subjected to light with an intensity of 1500 W/m2, which revealed a decrease in melting time, with the PA melting in 86 min. The PA melting time decreased by 37 % under solar irradiation.