Magnetic solid-phase extraction (MSPE) coupled with the spectrophotometric method for the simultaneous quantification of aluminum and beryllium ions based on mean centering of ratio (MCR) method is reported in the current work, for the first time. Two new magnetic ion-imprinted polymers (MIIPs) were synthesized using Chrome Azurol S as the ligand, (3-aminopropyl)triethoxysilane (APTES) as the functional monomer, tetraethyl orthosilicate (TEOS) as the cross-linker, and aluminum and beryllium ions as the templates, and used as magnetic sorbents. The characteristic properties of MIIPs were investigated using FT-IR spectroscopy, field emission scanning electron microscopy (FE-SEM), low angle X-ray powder diffraction (XRD), and energy-dispersive x-ray spectroscopy (EDS). Through this study, factors influencing the MSPE were studied and optimized. The proposed method exhibited good performance, with the linearity of 5.0–50.0 ng mL−1 for aluminum ion and 2.0–40.0 ng mL−1 for beryllium ion as well as the detection limits (DLs) of 3.2 and 0.9 ng mL−1 for aluminum and beryllium ions, respectively. At the end of the study, the capability of the developed method for determination of target analytes was evaluated by its application in the tap and river water samples.