This paper propose an observer-based stabilization method for stochastic Hamiltonian systems. First, for stochastic Hamiltonian systems without parameter uncertainty, we construct a state observer and design an observer-based stabilization controller such that the closed loop system is asymptotically stable. Then, we put forward an adaptive observer and a stabilization controller for stochastic nonlinear Hamiltonian systems with parameter uncertainty. The asymptotical convergence of the observers is shown without constructing the estimation error system and the Lyapunov functions are constructed by the Hamiltonian function. The internal structure of the system is fully utilized during the observer design and stability analysis. A numerical example is given to illustrate the effectiveness of the proposed method.