In this work we consider AdS$_3$ gravitational theory with certain mixed boundary conditions at spatial infinity. Using the Chern-Simons formalism of AdS$_3$ gravity, we find that these boundary conditions lead to non-trivial boundary terms, which, in turn, produce exactly the spectrum of the $Tbar{T}/Jbar{T}$-deformed CFTs. We then follow the procedure for constructing asymptotic boundary dynamics of AdS$_3$ to derive the constrained $Tbar{T}$-deformed WZW model from Chern-Simons gravity. The resulting theory turns out to be the $Tbar{T}$-deformed Alekseev-Shatashvili action after disentangling the constraints. Furthermore, by adding a $U(1)$ gauge field associated to the current $J$, we obtain one type of the $Jbar T$-deformed WZW model, and show that its action can be constructed from the gravity side. These results provide a check on the correspondence between the $Tbar{T}/Jbar{T}$-deformed CFTs and the deformations of boundary conditions of AdS$_3$, the latter of which may be regarded as coordinate transformations.