The optimal contract theory posits that an effective compensation plan should be based on performance. Globally, legislators are concerned about the gender pay gap due to stereotypes against women in line with congruity theory. Despite the plethora of gender-related studies, empirical evidence on the gender pay gap at the upper-echelon management level is limited, especially in Africa. Hence, the study examines the effect of CEO gender on CEO compensation in the Nigerian deposit money banks using a longitudinal research design. The study employed the ordinary least square (OLS), fixed effect method, and random effect method to analyze the 144 firm-year observations collected from the Nigerian Exchange Group (NGX) factbooks and the financial reports of 12 banks during 2011–2022. The Hausman Test (chi sq = 3.623, P = 0.003) and Redundant Fixed Effect Test (chi sq = 8.159, P = 0.000) indicated that the appropriate method of reporting is the fixed effect method. The association between CEO gender and CEO compensation (coeff = –8.690 and t = –10.31) is statistically negatively related. The study concluded a gender pay gap in favor of men among Nigerian Nigerian deposit money banks’ CEOs. These findings align with the congruity theory. The study recommends a mandatory gender pay parity plan in line with the optimal contract theory to reduce gender pay inequality.