Pelagic fish communities are shaped by bottom-up and top-down processes, transport by currents, and active swimming. However, the interaction of these processes remains poorly understood. Here, we use a regional implementation of the APex ECOSystem Model (APECOSM), a mechanistic model of the pelagic food web, to investigate these processes in the California Current, a highly productive upwelling system characterized by vigorous mesoscale circulation. The model is coupled with an eddy-resolving representation of ocean currents and lower trophic levels, and is tuned to reproduce observed fish biomass from fisheries independent trawls. Several emergent properties of the model compare realistically with observations. First, the epipelagic community accounts for one order of magnitude less biomass than the vertically migratory community, and is composed by smaller species. Second, the abundance of small fish decreases from the coast to the open ocean, while the abundance of large fish remains relatively uniform. This in turn leads to flattening of biomass size-spectra away from the coast for both communities. Third, the model reproduces a cross-shore succession of small to large sizes moving offshore, consistent with observations of species occurrence. These cross-shore variations emerge in the model from a combination of: (1) passive offshore advection by the mean current, (2) active swimming towards coastal productive regions to counterbalance this transport, and (3) mesoscale heterogeneity that reduces the ability of organisms to return to coastal waters. Our results highlight the importance of passive and active movement in structuring the pelagic food web, and suggest that a correct representation of these processes is needed for realistic simulations with marine ecosystem models.