Water scarcity is a global issue and finding alternative ways to meet our water needs within available resources is becoming increasingly important. Repurposing greywater for non‐potable uses, such as irrigation and car washing, can help alleviate the demand for drinking water. Greywater recycling and reuse are viable options to combat water scarcity. This study investigated the treatment of greywater using phytoremediation, specifically focusing on the effect of water hyacinth density and hydraulic retention time (HRT). An artificial neural network was used to optimize these parameters in the treatment system. The experiment spanned over 7 weeks and consisted of two phases. In phase I, different water hyacinth densities (ranging from 1.0 to 4.0 kg/m2) were tested, while phase II examined various HRTs (ranging from 12 to 48 h). The results indicated that the optimal conditions for greywater treatment were a water hyacinth density of 2 kg/m2 and an HRT of 48 h. Under these optimal conditions, the treatment system achieved high removal efficiencies for turbidity (98.02 ± 0.75%), chemical oxygen demand (59.42 ± 5.64%), ammonium‐nitrogen (87.45 ± 7.29%), and phosphate (94.50 ± 2.19%). However, the removal of total suspended solids was relatively low at 43.98 ± 9.20%. These findings were confirmed using an artificial neural network, showing a strong correlation (R > 0.99). The study concludes that phytoremediation using water hyacinth can be a viable option for greywater recycling and reuse, effectively addressing water scarcity. The recommended optimal conditions include a water hyacinth density of 2 kg/m2 and an HRT of 48 h.