A nanocapsule includes a shell including a polymer and a protein, a nucleic acid, or a combination thereof. The polymer has repeating units of Formula (I) (I) wherein X, L1, R1, and y are as described herein. The nanocapsule further includes a core comprising an oil. A composition is also disclosed including a plurality of the nanocapsules dispersed in an aqueous solution. The nanocapsules prepared according to the methods described herein are particularly useful for the delivery of proteins and nucleic acids into cells.