Rainfall is perhaps the most important source of drinking and agriculture water for the inhabitants of different parts of the world, particularly in arid and semi-arid area like Iran. Hence, the simulation of this hydrological phenomenon is crucial. The current research attempts to reproduce the long-term monthly precipitation of Ardabil, Iran, during 44 years from 1976 to 2020 for the first time via a hybrid fuzzy technique. For developing this model (WANFIS-FA), adaptive neuro-fuzzy inference system (ANFIS), firefly algorithm and wavelet transform were integrated. Firstly, the impacting lags of time series data were recognized by using the autocorrelation function and 14 WANFIS-FA models were defined using them. Then, the results of WANFIS-FA models were evaluated and the best WANFIS-FA model and the most influencing lags were found. For example, the variance accounted for index (VAF), correlation coefficient (R) and Nash–Sutcliffe coefficient (NSC) values for the superior WANFIS-FA model were computed to be 98.082, 0.990 and 0.980, respectively. In addition, the lags (t − 1), (t − 2), (t − 3) and (t − 12) were the most effective ones. Next, different members of the mother wavelet were tested and finally demy was selected as an optimal wavelet. Also, the analysis of the outcomes of the hybrid models demonstrated that the wavelet transform meaningfully enhanced the efficiency of the neuro-fuzzy model. Finally, the efficiency of WANFIS-FA was compared with ANFIS, WANFIS and ANFIS-FA, which displayed that WANFIS-FA performed better.