The study of transversal fluctuations of the optimal path is a crucial aspect of the Kardar-Parisi-Zhang (KPZ) universality class. In this work, we establish the large deviation limit for the midpoint transversal fluctuations in a general last-passage percolation (LPP) model with mild assumption on the i.i.d. weights. The rate function is expressed in terms of the right tail large deviation rate function of the last-passage value and the shape function. When the weights are chosen to be i.i.d. exponential random variables, our result verifies a conjecture communicated to us by Zhipeng Liu, showing the asymptotic probability of the geodesic from (0,0) to (n,n) following the corner path $(0,0) \to (n,0) \to (n,n)$ is $(4/e^2)^{n + o(n)}$