In this study, a novel medium-chain-length polyhydroxyalkanoate (mcl-PHA) film containing 39.25 mol% 3-hydroxyhexadecanoic acid (3HHD) was developed using a solution casting method. The pore sizes of the mcl-PHA film ranged from 150 to 250 nm. The thermal properties of the mcl-PHA film were characterised. The endothermic melting temperature (Tm) was 71.0 °C, the glass transition temperature (Tg) was about 1.1 °C, and the crystallinity (Xc) was 40.8%. The dye removal efficiency of mcl-PHA was evaluated under the following four different conditions: (a) dark, (b) sunlight, (c) ultraviolet (UV) light, and (d) fluorescent light. The highest dye removal of 49.7% was observed under sunlight after 210 min of treatment. The treated textile wastewater was also evaluated for the removal of suspended solids (SS), total solids (TS), and total dissolved solids (TDS), and the chemical oxygen demand (COD) and biochemical oxygen demand (BOD) were also evaluated. The results indicated that after treatment with the mcl-PHA film the dye wastewater had low COD and BOD and low SS, TS, and TDS. The COD was reduced by more than 61.0% after 135 min, and all tested values passed the requirements given by the National Standards-Waste Discharge Quality Standards for Industrial Units and Projects (Thailand).