By the time eukaryotic life or photosynthesis evolved on Earth, the martian surface had become extremely inhospitable, but the subsurface of Mars could potentially have contained a vast microbial biosphere. Crustal fluids may have welled up from the subsurface to alter and cement surface sediments, potentially preserving clues to subsurface habitability. Here we present a conceptual model of subsurface habitability of Mars and evaluate evidence for groundwater upwelling in deep basins. Many ancient, deep basins lack evidence for groundwater activity. However, McLaughlin Crater, one of the deepest craters on Mars, contains evidence for Mg-Fe-bearing clays and carbonates that probably formed in an alkaline, groundwater-fed lacustrine setting. This environment strongly contrasts with the acidic, water-limited environments implied by the presence of sulphate deposits that have previously been suggested to form owing to groundwater upwelling. Deposits formed as a result of groundwater upwelling on Mars, such as those in McLaughlin Crater, could preserve critical evidence of a deep biosphere on Mars. We suggest that groundwater upwelling on Mars may have occurred sporadically on local scales, rather than at regional or global scales.