Increasing and improving the critical transition temperature (TC), current density (JC) and the Meissner effect (HC) of conventional superconductors are the most important problems in superconductivity research, but progress has been slow for many years. In this study, by introducing the p-n junction nanostructured electroluminescent inhomogeneous phase with a red wavelength to realize energy injection, we found the improved property of smart meta-superconductors MgB2, the critical transition temperature TC increases by 0.8 K, the current density JC increases by 37%, and the diamagnetism of the Meissner effect HC also significantly improved, compared with pure MgB2. Compared with the previous yttrium oxide inhomogeneous phase, the p-n junction has a higher luminescence intensity, a longer stable life and simpler external field requirements. The coupling between superconducting electrons and surface plasmon polaritons may be explained by this phenomenon. The realization of smart meta-superconductor by the electroluminescent inhomogeneous phase provides a new way to improve the performance of superconductors.