Pneumolysin (PLY) is a cholesterol-binding, pore-forming protein toxin. It is an important virulence factor of Streptococcus pneumoniae and a key vaccine target against pneumococcal disease. We report a systematic structure-driven approach that solves a long-standing problem for vaccine development in this field: detoxification of PLY with retention of its antigenic integrity. Using three conformational restraint techniques, we rationally designed variants of PLY that lack hemolytic activity and yet induce neutralizing antibodies against the wild-type toxin. These results represent a key milestone toward a broad-spectrum protein-based pneumococcal vaccine and illustrate the value of structural knowledge in formulating effective strategies for antigen optimization.