The goal of this study was to investigate the impacts of various sedimentary-diagenetic conditions on the macroscopic petrophysical parameters and microscopic pore structures of tight sandstones from the Lower Jurassic Badaowan Formation in the Southern Junggar Basin, China. Based on the traditional methods for establishing pore size distribution, including integrating the results of high-pressure mercury injection, nuclear magnetic resonance, and scanning electron microscopy, the constrained least squares algorithm was employed to automatically determine the porosity contributions of pore types with different origins. The results show that there are six genetic pore types: residual intergranular pores (RIPs), feldspar dissolution pores (FDPs), rock fragment dissolution pores (RFDPs), clay mineral intergranular pores (CIPs), intercrystalline pores of kaolinite (IPKs), and matrix pores (MPs). Four lithofacies were identified: the quartz cemented-dissolution facies (QCDF), carbonate cemented facies (CCF), authigenic clay mineral facies (ACMF), and matrix-caused tightly compacted facies (MCTF). Modified by limited dissolution, the QCDF with a high proportion of macropores (RIPs, FDPs, and RFDPs) exhibited a slightly higher porosity and considerably higher permeability than those of others. A large number of micropores (MPs, CIPs, and IPKs) in MCTF and ACMF led to slightly lower porosities but considerably lower permeabilities. Due to the tightly cemented carbonates in the CCF, its porosity reduced sharply, but the permeability of the CCF remained much higher those of the MCTF and ACMF. The results highlight that a high proportion of macropores with large radii and regular shapes provide more effective percolation paths than storage spaces. Nevertheless, micropores with small radii and complex pore structures have a limited contribution to flow capability. The fractal dimension analysis shows that a high proportion of MPs is the major reason for the heterogeneity in tight sandstones. The formation of larger macropores with smooth surfaces are more conductive for oil and gas accumulation.