Measurements of the inclusive and differential fiducial cross sections of the Higgs boson are presented, using the lepton decay channel. The differential cross sections are measured as a function of the Higgs boson transverse momentum, jet multiplicity, and transverse momentum of the leading jet in the event if any. The analysis is performed using proton-proton data collected by the CMS detector at a center-of-mass energy of 13~\mathrm{TeV} and amounting to an integrated luminosity of 138~\mathrm{fb}^{-1}. These are the first differential measurements of the Higgs boson cross section in the final state of two leptons, and they constitute a significant improvement over measurements in other final states in parts of the phase space, namely in events with a large jet multiplicity or with Lorentz-boosted Higgs bosons.