A variety of enhanced statistical and numerical methods are now routinely used to extract important thermodynamic and kinetic information from the vast amount of complex, high-dimensional data obtained from molecular simulations. For the characterization of kinetic properties, Markov state models, in which the long-time statistical dynamics of a system is approximated by a Markov chain on a discrete partition of configuration space, have seen widespread use in recent years. However, obtaining kinetic properties for molecular systems with high energy barriers remains challenging as often enhanced sampling techniques are required with biased simulations to observe the relevant rare events. Particularly, the calculation of diffusion coefficients remains elusive from biased molecular simulation data. Here, we propose a novel method that can calculate multidimensional position-dependent diffusion coefficients equally from either biased or unbiased simulations using the same formalism. Our method builds on Markov state model analysis and the Kramers-Moyal expansion. We demonstrate the validity of our formalism using one- and two-dimensional analytic potentials and also apply it to data from explicit solvent molecular dynamics simulations, including the water-mediated conformations of alanine dipeptide and umbrella sampling simulations of drug transport across a lipid bilayer. Importantly, the developed algorithm presents significant improvement compared to standard methods when the transport of solute across three-dimensional heterogeneous porous media is studied, for example, the prediction of membrane permeation of drug molecules.