This article focuses on computing Hamiltonian matrix exponential. Given a Hamiltonian matrix H, it is well-known that the matrix exponential eH is a symplectic matrix and its eigenvalues form reciprocal (λ, 1 / λ¯). It is important to take care of the symplectic structure for computing eH. Based on the structure-preserving flow proposed by Kuo et al. (SIAM J Matrix Anal Appl 37:976–1001, 2016), we develop a numerical method for computing the symplectic matrix pair (M, L) which represents eH.