The modification of magnesium implants with functional organic molecules is important for increasing the biological acceptance and for reducing the corrosion rate of the implant. In this work, we evaluated by a combined experimental and theoretical approach the adsorption strength and geometry of a functional self-assembled monolayer (SAM) of hydrolyzed (3-aminopropyl)triethoxysilane (APTES) molecules on a model magnesium implant surface. In time-of-flight secondary ion mass spectrometry (ToF-SIMS) and X-ray photoelectron spectroscopy (XPS), only a minor amount of reverse attachment was observed. Substrate-O-Si signals could be detected, as well as other characteristic APTES fragments. The stability of the SAM upon heating in UHV was investigated additionally. Density-functional theory (DFT) calculations were used to explore the preferred binding mode and the most favorable binding configuration of the hydrolyzed APTES molecules on the hydroxylated magnesium substrate. Attachment of the molecules via hydrogen bonding or covalent bond formation via single or multiple condensation reactions were considered. The impact of the experimental conditions and the water concentration in the solvent on the thermodynamic stability of possible APTES binding modes is analyzed as a function of the water chemical potential of the environment. Finally, the influence of van der Waals contributions to the adsorption energy will be discussed.