; Zhang, Shao-Jun] Shanghai Jiao Tong Univ, Dept Phys & Astron, Shanghai 200240, Peoples R China
; [Tian, Yu] Univ Chinese Acad Sci, Sch Phys, Beijing 100049, Peoples R China
; [Wu, Xiao-Ning] Chinese Acad Sci, Acad Math & Syst Sci, Inst Math, Beijing 100190, Peoples R China
; [Tian, Yu
; Wu, Xiao-Ning] Chinese Acad Sci, Inst Theoret Phys, State Key Lab Theoret Phys, Beijing 100190, Peoples R China
; [Wu, Xiao-Ning] Chinese Acad Sci, Hua Loo Keng Key Lab Math, Beijing 100190, Peoples R China
Starting from the surface term of gravitational action, one can construct a Virasoro algebra with central extension, with which the horizon entropy can be derived using the Cardy formula. This approach provides a new routine for calculating and interpreting the horizon entropy. In this paper, we generalize this approach to a more general case, the isolated horizon, which contains non-stationary spacetimes beyond stationary ones. By imposing appropriate boundary conditions near the horizon, the full set of diffeomorphisms is restricted to a subset where the corresponding Noether charges form a Virasoro algebra with central extension. Then by using the Cardy formula, we can derive the entropy of the isolated horizon.