Interacting compact binary systems provide a natural laboratory in which to study irradiated substellar objects. As the mass-losing secondary (donor) in these systems makes a transition from the stellar to the substellar regime, it is also irradiated by the primary (compact accretor)1,2. The internal and external energy fluxes are both expected to be comparable in these objects, providing access to an unexplored irradiation regime. The atmospheric properties of donors are largely unknown3, but could be modified by the irradiation. To constrain models of donor atmospheres, it is necessary to obtain accurate observational estimates of their physical properties (masses, radii, temperatures and albedos). Here we report the spectroscopic detection and characterization of an irradiated substellar donor in an accreting white-dwarf binary system. Our near-infrared observations allow us to determine a model-independent mass estimate for the donor of 0.055 ± 0.008 solar masses and an average spectral type of L1 ± 1, supporting both theoretical predictions and model-dependent observational constraints that suggest that the donor is a brown dwarf. Our time-resolved data also allow us to estimate the average irradiation-induced temperature difference between the dayside and nightside of the substellar donor (57 kelvin) and the maximum difference between the hottest and coolest parts of its surface (200 kelvin). The observations are well described by a simple geometric reprocessing model with a bolometric (Bond) albedo of less than 0.54 at the 2σconfidence level, consistent with high reprocessing efficiency, but poor lateral heat redistribution in the atmosphere of the brown-dwarf donor4,5. These results add to our knowledge of binary evolution, in that the donor has survived the transition from the stellar to the substellar regime, and of substellar atmospheres, in that we have been able to test a regime in which the irradiation and the internal energy of a brown dwarf are comparable.