Abstract The high cosmological precision offered by the next generation of galaxy surveys hinges on improved corrections for Galactic dust extinction. We explore the possibility of estimating both the dust extinction and large-scale structure from a single photometric galaxy survey, making use of the predictable manner in which Milky Way dust affects the measured brightness and colors of galaxies in a given sky location in several redshift bins. To test our method, we use a synthetic catalog from a cosmological simulation designed to model the Vera C. Rubin Observatory Legacy Survey of Space and Time. At high Galactic latitude (∣b∣ ≳ 20°) and a resolution of 1° ( 7 ′ ), we predict the uncertainty in the measurement of dust extinction, E(B − V), to be 0.005 mag (0.015 mag). This is similar to the uncertainty of existing dust maps, illustrating the feasibility of our method. Simultaneous estimation of large-scale structure is predicted to recover the galaxy overdensity δ with a precision of ∼0.01 (∼0.05) at 1° ( 7 ′ ) resolution. We also introduce a Bayesian formalism that combines prior information from existing dust maps with the likelihood of Galactic dust extinction determined from the excursion of observed galaxy properties.