Perovskite has attracted extensive attention in the realm of photovoltaic and light-emitting diodes (LEDs) on account of its outstanding photoelectric properties. Perovskite-type quantum wells (QW) have been developed for high-efficiency perovskite-type LEDs. However, there are few reports on the in situ quantum well structure formed by a bimetallic antiperovskite and its properties. In this work, we report a double/bimetallic antiperovskite composed of magnesium and manganese. It is an in situ homogeneous junction composed of a p-type manganese well layer and an n-type magnesium barrier layer, which promotes the recombination of carriers and increases the luminous efficiency. The in situ quantum wells enable the green antiperovskite LED to have a maximum external quantum efficiency reaching 20.2% and a maximum luminance as high as 19000 cd m-2. These research results provide the chance to produce high-performance LEDs based on an in situ quantum well structure. Meanwhile, the strategy developed in this work is helpful for the design of other highly luminescent lead-free materials.