During the motion of a binary pulsar around the Galactic center, the pulsar and its companion experience a wind of dark-matter particles that can affect the orbital motion through dynamical friction. We show that this effect produces a characteristic seasonal modulation of the orbit and causes a secular change of the orbital period whose magnitude can be well within the astonishing precision of various binary-pulsar observations. Our analysis is valid for binary systems with orbital period longer than a day. By comparing this effect with pulsar-timing measurements, it is possible to derive model-independent upper bounds on the dark-matter density at different distances $D$ from the Galactic center. For example, the precision timing of $\mathrm{J}1713+0747$ imposes ${\ensuremath{\rho}}_{\mathrm{DM}}\ensuremath{\lesssim}{10}^{5}\text{ }\text{ }{\mathrm{GeV}/\mathrm{cm}}^{3}$ at $D\ensuremath{\approx}7\text{ }\text{ }\mathrm{kpc}$. The detection of a binary pulsar at $D\ensuremath{\lesssim}10\text{ }\text{ }\mathrm{pc}$ could provide stringent constraints on dark-matter halo profiles and on growth models of the central black hole. The Square Kilometer Array can improve current bounds by 2 orders of magnitude, potentially constraining the local density of dark matter to unprecedented levels.