Analytical (rational) mechanics is the mathematical structure of Newtonian deterministic dynamics developed by D'Alembert, Lagrange, Hamilton, Jacobi, and many other luminaries of applied mathematics. Diffusion as a stochastic process of an overdamped individual particle immersed in a fluid, initiated by Einstein, Smoluchowski, Langevin and Wiener, has no momentum since its path is nowhere differentiable. In this exposition, we illustrate how analytical mechanics arises in stochastic dynamics from a randomly perturbed ordinary differential equation dXt = b(Xt)dt+ϵdWt, where Wt is a Brownian motion. In the limit of vanishingly small ϵ, the solution to the stochastic differential equation other than [Formula: see text] are all rare events. However, conditioned on an occurrence of such an event, the most probable trajectory of the stochastic motion is the solution to Lagrangian mechanics with [Formula: see text] and Hamiltonian equations with H(p, q) = ‖p‖2+b(q)⋅p. Hamiltonian conservation law implies that the most probable trajectory for a "rare" event has a uniform "excess kinetic energy" along its path. Rare events can also be characterized by the principle of large deviations which expresses the probability density function for Xt as f(x, t) = e-u(x, t)/ϵ, where u(x, t) is called a large-deviation rate function which satisfies the corresponding Hamilton–Jacobi equation. An irreversible diffusion process with ∇×b≠0 corresponds to a Newtonian system with a Lorentz force [Formula: see text]. The connection between stochastic motion and analytical mechanics can be explored in terms of various techniques of applied mathematics, for example, singular perturbations, viscosity solutions and integrable systems.