The Heisenberg Uncertainty Principle (HUP) limits the accuracy in the simultaneous measurements of the position and momentum variables of any quantum system. This is known to be true in the context of non-relativistic quantum mechanics. Based on a semiclassical geometric approach, here we propose an effective generalization of this principle, which is well-suited to be extended to general relativity scenarios as well. We apply our formalism to Schwarzschild and de Sitter spacetime, showing that the ensuing uncertainty relations can be mapped into well-known deformations of the HUP. We also infer the form of the perturbed metric that mimics the emergence of a discrete spacetime structure at Planck scale, consistently with the predictions of the Generalized Uncertainty Principle. Finally, we discuss our results in connection with other approaches recently appeared in the literature.