The gravitational waves (GWs) emitted by inspiralling binary black holes, expected to be detected by the Laser Interferometer Space Antenna (LISA), could be used to determine the luminosity distance to these sources with the unprecedented precision of ≲1 per cent. We study cosmological parameter constraints from such standard sirens, in the presence of gravitational lensing by large-scale structure. Lensing introduces magnification with a probability distribution function (PDF) whose shape has significant skewness and kurtosis, and depends on cosmological parameters. We use Monte Carlo simulations to generate mock samples of standard sirens, including a small intrinsic scatter, as well as the additional, larger scatter from lensing, in their inferred distances. We derive constraints on cosmological parameters, by simultaneously fitting the mean and the distribution of the residuals on the distance versus redshift (dL–z) Hubble diagram. We find that for standard sirens at redshift z≈ 1, the sensitivity to a single cosmological parameter, such as the matter density Ωm, or the dark energy equation of state w, is ∼50–80 per cent tighter when the lensing PDF is used, compared to the sensitivity derived from a Gaussian PDF with the same variance. When these two parameters are constrained simultaneously, the non-Gaussian shape yields a further enhanced improvement (by ∼120 per cent), owing to the correlation between the parameters. The sensitivity to the amplitude of the matter power spectrum, σ8 from the cosmological dependence of the PDF alone, however, is ∼20 per cent worse than that from the Gaussian PDF. The improvements for Ωm and w arise purely from the non-Gaussian shape of the lensing PDF and can be attributed specifically to the sharpness of the peak of this PDF (i.e. to a finite kurtosis); the dependence of the PDF on these parameters does not improve constraints relative to those available from the mean dL–z relation. At higher redshifts, the PDF resembles a Gaussian more closely, and the effects of the non-Gaussianities become less prominent. These results highlight the importance of obtaining an accurate and reliable PDF of the lensing convergence, in order to realize the full potential of standard sirens as cosmological probes.