Ionospheric chemistry plays an unexpectedly important role in the evolution of planetary habitability. This study is dedicated to a detailed modeling of the nightside Martian ionospheric structure and composition, a topic that has been poorly explored due to the absence of relevant measurements, but now becomes tractable owing to the unprecedented measurements made by the Mars Atmosphere and Volatile Evolution. Two-stream kinetic calculations and time-dependent fluid calculations are coupled to derive the nightside density profiles at 100–300 km for a large number of ion species, assuming solar wind electron precipitation as the only viable ionizing source in the ideal nonmagnetized atmosphere. Our calculations indicate the presence of a well-defined ionospheric peak at 146 km with a peak density of 8500 cm−3, as driven by the strong atmospheric “absorption” of precipitating electrons at low altitudes. The distribution of nonterminal species is roughly under chemical equilibrium below 170 km, whereas for terminal species such as NO+ and HCO+, diffusion is effective at essentially all altitudes, in direct contrast to the dayside behavior. In the more realistic magnetized atmosphere, the ionospheric peak seldom exists due to the patchiness of electron precipitation. In particular, our model results agree fairly well with the MAVEN measurements, especially in view of the coincidence between electron depletion and thermal plasma void seen along many MAVEN orbits. Compared to the dayside, the nightside ionospheric composition has a much higher proportion of NO+ and lower proportion of CO2 +, likely indicative of nightside enhancement of atmospheric O and N.