The ubiquitous presence of pharmaceutical pollutants in the environment significantly threatens human health and aquatic ecosystems. Conventional wastewater treatment processes often fall short of effectively removing these emerging contaminants. Therefore, the development of high-performance adsorbents is crucial for environmental remediation. This research utilizes molecular simulation to explore the potential of novel modified metal-organic frameworks (MOFs) in pharmaceutical pollutant removal, paving the way for the design of efficient wastewater treatment strategies. Utilizing UIO-66, a robust MOF, as the base material, we developed UIO-66 functionalized with chitosan (CHI) and oxidized chitosan (OCHI). These modified MOFs' physical and chemical properties were first investigated through various characterization techniques. Subsequently, molecular dynamics simulation (MDS) and Monte Carlo simulation (MCS) were employed to elucidate the adsorption mechanisms of rosuvastatin (ROSU) and simvastatin (SIMV), two prevalent pharmaceutical pollutants, onto these nanostructures. MCS calculations demonstrated a significant enhancement in the adsorption energy by incorporating CHI and OCHI into UIO-66. This increased ROSU from -14,522 to -16,459 kcal/mol and SIMV from -17,652 to -21,207 kcal/mol. Moreover, MDS reveals ROSU rejection rates in neat UIO-66 to be at 40%, rising to 60 and 70% with CHI and OCHI. Accumulation rates increase from 4 Å in UIO-66 to 6 and 9 Å in UIO-CHI and UIO-OCHI. Concentration analysis shows SIMV rejection surges from 50 to 90%, with accumulation rates increasing from 6 to 11 Å with CHI and OCHI in UIO-66. Functionalizing UIO-66 with CHI and OCHI significantly enhanced the adsorption capacity and selectivity for ROSU and SIMV. Abundant hydroxyl and amino groups facilitated strong interactions, improving performance over that of unmodified UIO-66. Surface functionalization plays a vital role in customizing the MOFs for pharmaceutical pollutant removal. These insights guide next-gen adsorbent development, offering high efficiency and selectivity for wastewater treatment.