The detection of chlorinated organic compounds in near-surface sedimentary rocks by the Sample Analysis at Mars (SAM) instrument suite aboard the Mars Science Laboratory Curiosity rover represents an important step toward characterizing habitable environments on Mars. However, this discovery also raises questions about the identity and source of their precursor compounds and the processes by which they become chlorinated. Here we present the results of analog experiments, conducted under conditions similar to SAM gas chromatography-mass spectrometry analyses, in which we pyrolyzed potential precursor compounds in the presence of various Cl salts and Fe oxides that have been identified in Martian sediments. While chloromethanes could not be unambiguously identified, 1,2-dichloropropane (1,2-DCP), which is one of the chlorinated compounds identified in SAM data, is formed from the chlorination of aliphatic precursors. Additionally, propanol produced more 1,2-DCP than nonfunctionalized aliphatics such as propane or hexanes. Chlorinated benzenes ranging from chlorobenzene to hexachlorobenzene were identified in experiments with benzene carboxylic acids but not with benzene or toluene. Lastly, the distribution of chlorinated benzenes depended on both the substrate species and the nature and concentration of the Cl salt. Ca and Mg perchlorate, both of which release O2 in addition to Cl2 and HCl upon pyrolysis, formed less chlorobenzene relative to the sum of all chlorinated benzenes than in experiments with ferric chloride. FeCl3, a Lewis acid, catalyzes chlorination but does not aid combustion. Accordingly, both the precursor chemistry and sample mineralogy exert important controls on the distribution of chlorinated organics.