The poly(lactic acid)/glycerol–poly(ε-caprolactone)–poly(d-lactic acid) (PLLA/GLY–PCL–PDLA) foam, which exhibits the integrated properties of high porosity, oil–water separation, and hydrophobic–oleophilic wettability, is successfully prepared by thermally induced phase separation methods. The star-shaped GLY–PCL–PDLA copolymer is synthesized by stepwise ring-opening polymerization. The special three-arm structure can form a three-dimensional physical cross-linked network structure with linear PLLA. The intersections of the arms of the star-shaped polymer can act as heterogeneous nucleating agents to promote linear polymer crystallization. The plasticizing effect of PCL reduces the folding energy of PLA chains and enhances their movement ability, which in turn induces the formation of stereocomposite crystals and results in a reduction in the glass transition temperature. The PDLA chain length in star polymers is closely related to the formation of stereocomposite crystals, and the stereocomposite crystals cannot form when the PDLA chain length in the copolymer is 30. The small pore structure traps air and forms an air cushion underneath the water droplets, significantly increasing the foam’s water contact angle to 146°. The porosity can grow up to 94% by expanding the volume of the polymer-lean phase. In addition, the resultant foam exhibits an excellent oil absorption performance (16 g/g) and does not decrease significantly after 10 cycles, which has great potential for application in oil–water separation.