We present the first degree-scale tomography map of the dusty magnetized interstellar medium (ISM) from stellar polarimetry and distance measurements. We used the RoboPol polarimeter at Skinakas Observatory to conduct a survey of the polarization of starlight in a region of the sky of about four square degrees. We propose a Bayesian method to decompose the stellar-polarization source field along the distance to invert the three-dimensional (3D) volume occupied by the observed stars. We used this method to obtain the first 3D map of the dusty magnetized ISM. Specifically, we produced a tomography map of the orientation of the plane-of-sky component of the magnetic field threading the diffuse, dusty regions responsible for the stellar polarization. For the targeted region centered on Galactic coordinates (l, b) ≈ (103.3°, 22.3°), we identified several ISM clouds. Most of the lines of sight intersect more than one cloud. A very nearby component was detected in the foreground of a dominant component from which most of the polarization signal comes and which we identified as being an intersection of the wall of the Local Bubble and the Cepheus Flare. Farther clouds, with a distance of up to 2 kpc, were similarly detected. Some of them likely correspond to intermediate-velocity clouds seen in H I spectra in this region of the sky. We found that the orientation of the plane-of-sky component of the magnetic field changes along distance for most of the lines of sight. Our study demonstrates that starlight polarization data coupled to distance measures have the power to reveal the great complexity of the dusty magnetized ISM in 3D and, in particular, to provide local measurements of the plane-of-sky component of the magnetic field in dusty regions. This demonstrates that the inversion of large data volumes, as expected from the PASIPHAE survey, will provide the necessary means to move forward in the modeling of the Galactic magnetic field and of the dusty magnetized ISM as a contaminant in observations of the cosmic microwave background polarization.