Gene therapy employs exogenous nucleic acids to treat genetic diseases and disorders. The insufficient cytosolic delivery of genetic materials remains a major hurdle for effective gene therapy. To address this challenge, we have designed and synthesized various cationic protein nanocapsules that can efficiently condense nucleic acids via self-assembly. Through systematically investigating the gene transfection efficiency of these nanocapsules as delivery vectors, we find that nanocapsules, which were synthesized with hydrolyzable polymers containing tertiary amine groups, afford the highest transfection efficiency (~ 80%), resulting in stable protein expression for over four days. The mechanistic study reveals that tertiary amine groups facilitate the endosomal escape of the nucleic acid-nanocapsule complexes after their cell internalization via endocytosis. The subsequent hydrolysis of the polymers triggers the cytosolic release of the nucleic acids, thereby prompting gene expression. Our results not only provide a new class of gene delivery vectors but also detail the parameters for future vector design.