Biofilm formation remains an ongoing challenge for implantable medical devices due to infection, drug resistance, and related complications. The device surface serves as the first line of defense against bacterial adhesion. Semi-crystalline polymers present repellent crystalline phases and attachable amorphous phases on their surfaces. Here, this intrinsic property is utilized to demonstrate an anti-biofilm mechanism by controlling the inter-crystal spacing in two cross-checkable types of shape memory polymer (SMP). When shape recovery is repeated (No -> Once -> Multiple: 10 times) through programming, the applied force and temperature fluctuation promote crystal alignment and growth on the polymer surface, accompanied by a reduction in amorphous spacing. Three representative biofilm-inducible bacterial species are cultured on the SMP surfaces. As the recovery cycle is repeated, progressive alignment and growth of the crystalline phase enhance bacterial repellency in collaboration with the reduction of amorphous space. When an SMP tube is used to replace a segment of the bile duct for 1 year in a dog model, biliary function is well maintained without biofilm formation or stenotic response through this mechanism. These results suggest a promising strategy for polymeric devices to amplify anti-biofilm effects under implantation by utilizing dynamic body movements as a driving force to align and grow crystalline phases.