This work is devoted to deriving the Onsager-Machlup function for a class of stochastic dynamical systems under (non-Gaussian) Lévy noise as well as (Gaussian) Brownian noise, and examining the corresponding most probable paths. This Onsager-Machlup function is the Lagrangian giving the most probable path connecting metastable states for jump-diffusion processes. This is done by applying the Girsanov transformation for measures induced by jump-diffusion processes. Moreover, we have found this Lagrangian function is consistent with the result in the special case of diffusion processes. Finally, we apply this new Onsager-Machlup function to investigate dynamical behaviors analytically and numerically in several examples. These include the transitions from one metastable state to another metastable state in a double-well system, with numerical experiments illustrating most probable transition paths for various noise parameters.