We derive here Lagrangian fluctuation-dissipation relations for advected scalars in wall-bounded flows. The relations equate the dissipation rate for either passive or active scalars to the variance of scalar inputs from the initial values, boundary values, and internal sources, as those are sampled backward in time by stochastic Lagrangian trajectories. New probabilistic concepts are required to represent scalar boundary conditions at the walls: the boundary local-time density at points on the wall where scalar fluxes are imposed and the boundary first hitting-time at points where scalar values are imposed. These concepts are illustrated both by analytical results for the problem of pure heat conduction and by numerical results from a database of channel-flow flow turbulence, which also demonstrate the scalar mixing properties of near-wall turbulence. As an application of the fluctuation-dissipation relation, we examine for wall-bounded flows the relation between anomalous scalar dissipation and Lagrangian spontaneous stochasticity, i.e. the persistent non-determinism of Lagrangian particle trajectories in the limit of vanishing viscosity and diffusivity. In the first paper of this series, we showed that spontaneous stochasticity is the only possible mechanism for anomalous dissipation of passive or active scalars, away from walls. Here it is shown that this remains true when there are no scalar fluxes through walls. Simple examples show, on the other hand, that a distinct mechanism of non-vanishing scalar dissipation can be thin scalar boundary layers near the walls. Nevertheless, we prove for general wall-bounded flows that spontaneous stochasticity is another possible mechanism of anomalous scalar dissipation.