We propose a versatile and accurate method to estimate the halo mass and concentration from the kinematics of satellite galaxies. We construct the 6D phase-space distribution function of satellites from a cosmological simulation based on the similarity of internal dynamics for different halos. Within the Bayesian statistical framework, not only can we efficiently infer the halo mass and concentration, we can also treat various observational effects, including the selection function, incomplete data, and measurement errors, in a rigorous and straightforward manner. Through tests with mock samples, we show that our method is valid and accurate, as well as more precise than pure steady-state methods. It can constrain the halo mass to within ∼20% using only 20 tracers and has a small intrinsic uncertainty of ∼10%. In addition to the clear application to the Milky Way and similar galaxies, our method can be extended to galaxy groups or clusters.