In the pursuit of multifunctional coatings, the controlled growth of materials on stationary platforms holds paramount importance for achieving superior corrosion protection and optimal photocatalytic performance. This study introduces a cutting-edge approach, intertwining bifunctional metal-organic frameworks (MOFs) seamlessly into defective MgO layers produced by the anodic oxidation of AZ31 alloy.