A theoretical framework for solute flux through spatially nonstationary flows in porous media is presented. The flow nonstationarity may stem from medium nonstationarity (e.g., the presence of distinct geological layers, zones, or facies), finite domain boundaries, and/or fluid pumping and injecting. This work provides an approach for studying solute transport in multiscale media, where random heterogeneities exist at some small scale while deterministic geological structures and patterns can be prescribed at some larger scale. In such a flow field the solute flux depends on solute travel time and transverse displacement at a fixed control plane. The solute flux statistics (mean and variance) are derived using the Lagrangian framework and are expressed in terms of the probability density functions (PDFs) of the particle travel time and transverse displacement. These PDFs are given with the statistical moments derived based on nonstationary Eulerian velocity moments. The general approach is illustrated with some examples of conservative and reactive solute transport in stationary and nonstationary flow fields. It is found based on these examples that medium nonstationarities (or multiscale structures and heterogeneities) have a strong impact on predicting solute flux across a control plane and on the corresponding prediction uncertainty. In particular, the behavior of solute flux moments strongly depends on the configuration of nonstationary medium features and the source dimension and location. The developed nonstationary approach may result in non-Gaussian (multiple modal) yet realistic behaviors for solute flux moments in the presence of flow nonstationarities, while these non-Gaussian behaviors may not be reproduced with a traditional stationary approach.