This work aims to optimize the extraction of natural dye from coconut husks for use in the textile industry. The optimization process was carried out using the One-Factor-at-a-Time (OFAT) approach. Before optimization, different parts of the coconut husk i.e., endocarp, exocarp, mesocarp, and a mixture of mesocarp and exocarp were screened for their potential to be used as dye. It was found that the combination of mesocarp and exocarp has the highest potential in terms of physicochemical and phytochemical properties as it resulted in the best yield of extract, pH and colour intensity, and the highest Total Flavonoid Content, Total Phenolic Content, and Total Tannin Content. The optimal parameters to extract dye from coconut husk (combination of mesocarp and exocarps) are particle size of 2 mm, sample to solvent ratio of 1:100, extraction time of 60 min, and a temperature of 100 °C. The dye extract was tested for use on cotton fabric. It was found that regardless of the mordanting method, acetic acid is the best mordant to use. It resulted in a brighter and more intense colour than alum. The usage of acetic acid as the mordant combined with the pre-mordant method was found to be the best for colour fixation of the natural dye from coconut husk on cotton fabric.