Lapid and Mao formulated a conjecture on an explicit formula of Whittaker–Fourier coefficients of automorphic forms on quasi-split reductive groups and metaplectic groups as an analogue of the Ichino–Ikeda conjecture. They also showed that this conjecture is reduced to a certain local identity in the case of unitary groups. In this article, we study the even unitary-group case. Indeed, we prove this local identity over p-adic fields. Further, we prove an equivalence between this local identity and a refined formal degree conjecture over any local field of characteristic zero. As a consequence, we prove a refined formal degree conjecture over p-adic fields and get an explicit formula of Whittaker–Fourier coefficients under certain assumptions.