In this study, we present a novel application of thin magnesium fluoride films to form electron-selective contacts to n-type crystalline silicon (c-Si). This allows the demonstration of a 20.1%-efficient c-Si solar cell. The electron-selective contact is composed of deposited layers of amorphous silicon (∼6.5 nm), magnesium fluoride (∼1 nm), and aluminum (∼300 nm). X-ray photoelectron spectroscopy reveals a work function of 3.5 eV at the MgF2/Al interface, significantly lower than that of aluminum itself (∼4.2 eV), enabling an Ohmic contact between the aluminum electrode and n-type c-Si. The optimized contact structure exhibits a contact resistivity of ∼76 mΩ·cm(2), sufficiently low for a full-area contact to solar cells, together with a very low contact recombination current density of ∼10 fA/cm(2). We demonstrate that electrodes functionalized with thin magnesium fluoride films significantly improve the performance of silicon solar cells. The novel contacts can potentially be implemented also in organic optoelectronic devices, including photovoltaics, thin film transistors, or light emitting diodes.