A method of synthesizing PHA nanocapsules as a protein carrier, particularly, the synthesis of PHA nanocapsules synthesized by a modified precipitation/solvent evaporation technique with neutralization. Specifically, the method comprises the steps of sonicating a first solution comprising a triblock PHA copolymer, stirring the first solution into a second solution to give a third solution, the second solution containing a protein, and the second solution being acidic. Further, the method comprises adding the third solution with a neutralizing agent to give a neutralized solution, and sonicating the neutralized solution to form a final solution, wherein the synthesized PHA nanocapsules containing the protein are formed in the final solution. Further, PHA nanocapsules encapsulated with the protein is used by administering the synthesized PHA nanocapsule to an animal in need thereof via the oral cavity.