We report the synthesis and characterization of alloyed Sn-Pb methylammonium mixed-halide perovskites (CH3NH3SnyPb1-yI3-xClx) to extend light harvesting toward the near-infrared region for carbon-based mesoscopic solar cells free of organic hole-transport layers. The proportions of Sn in perovskites are well-controlled by mixing tin chloride (SnCl2) and lead iodide (PbI2) in varied stoichiometric ratios (y = 0-1). SnCl2 plays a key role in modifying the lattice structure of the perovskite, showing anomalous optical and optoelectronic properties; upon increasing the concentration of SnCl2, the variation of the band gap and band energy differed from those of the SnI2 precursor. The CH3NH3SnyPb1-yI3-xClx devices showed enhanced photovoltaic performance upon increasing the proportion of SnCl2 until y = 0.75, consistent with the corresponding potential energy levels. The photovoltaic performance was further improved upon adding 30 mol % tin fluoride (SnF2) with device configuration FTO/TiO2/Al2O3/NiO/C, producing the best power conversion efficiency, 5.13%, with great reproducibility and intrinsic stability.