Cubic CsPbI3 perovskite quantum dots (PQDs) with ideal optoelectronic properties are promising materials for solution-processed photovoltaics. However, their phase stability suffers from the weakly bound surface ligands. Here, we report the adoption of p-mercaptopyridine ligand post-treatment on PQDs and obtained enhanced electronic coupling and cubic phase robustness in comparison with the treatment using analogous o-mercaptopyridine and pyridine ligands. As a result, CsPbI3 PQDs solar cells achieved an efficiency of 14.25%. More importantly, the device stability was drastically improved, showing decent efficiency after storage under ambient conditions for ∼70 days. We revealed that tuning of the anchoring position can facilely enhance the ligand binding strength and surface coverage, providing efficient ways to significantly improve the performance and stability of PQD-based optoelectronic devices.