  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
$T\bar{T}/J\bar{T}$-deformed CFTs. We then follow the procedure for
constructing asymptotic boundary dynamics of AdS$_3$ to derive the constrained
$T\bar{T}$-deformed WZW model from Chern-Simons gravity. The resulting theory
turns out to be the $T\bar{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 $J\bar 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
$T\bar{T}/J\bar{T}$-deformed CFTs and the deformations of boundary conditions
of AdS$_3$, the latter of which may be regarded as coordinate transformations.
