The complex pore structure and storage mechanism of shales make the mass transport in these ultratight reservoirs complicated and significantly different from typical conventional rocks. A substantial fraction of total pore volume in organic-rich ultratight reservoirs consists of nanopores in which the notion of viscous flow may become irrelevant. Instead, multiple transport and storage mechanisms should be considered to model fluid transport within the shale matrix, including molecular diffusion, Knudsen diffusion, surface diffusion, and sorption. This paper presents a diffusion-based semi-analytical model for a single-component gas transport within an infinite-acting organic-rich ultratight matrix. The model treats free and sorbed gas as two phases coexisting in nanopores. The overall mass conservation equation for both phases is transformed into one governing equation solely based on the concentration (density) of the free-phase. As a result, the partial differential equation (PDE) governing the overall mass transport carries two newly-defined nonlinear terms; namely, overall diffusivity, D, and sorption-corrected porosity, F. The D term accounts for the molecular, Knudsen, and surface diffusivity, and the F term considers the mass exchange between free- and sorbed-phases under sorption equilibrium condition. Both D and F are functions of free-phase concentration. The nonlinear PDE is solved by applying a piecewise-constant-coefficient technique that divides the domain under consideration into an arbitrary number of subdomains. Each subdomain is assigned with a constant D and F. The diffusion-based model is validated against numerical simulation. The model is then used to investigate the impact of surface diffusivity, Knudsen diffusivity, porosity, and adsorption capacity on gas transport within the ultratight formation. Further, the model is utilized to study gas transport and production from Barnett, Marcellus, and New Albany shales. The results show that surface diffusion significantly contributes to gas production in shales with high surface diffusivity and adsorption capacity and when the Knudsen diffusivity and total porosity are small. Thus, neglecting surface diffusion in organic-rich shales may result in the underestimation of gas production.