A large number of trans-Neptunian objects are found to have orbits that are commensurate with the 3: 2 mean-motion resonance of Neptune's orbit. These objects were probably captured into this resonant configuration when proto-Neptune migrated outward from its cradle. Up to now, only a few objects have been found at Neptune's 2: 1 resonance (which is also a strong mean-motion resonance). This observed distribution of objects provides a strong constraint on the migration timescale and mechanism. With a series of numerical simulations, we show that Neptune would indeed trap objects onto its 3: 2 resonance if it were to migrate outward over a timescale≳ 10 6 yr. But in order to avoid the concurrent capture of objects onto its 2: 1 resonance, Neptune's migration timescale must be≲ 10 7 yr. Thus, the resonant capture process is likely to have occurred during the epoch of protoplanetary formation. We examine two potential mechanisms that are both compatible with the constraint set by the orbital distribution of trans-Neptunian objects.(1) In the cold outer regions of the gaseous solar nebula, proto-Neptune's tidal perturbation may have led to the formation of a gap near its orbit, the termination of its gas accretion, and the migration of its orbit along with the viscous expansion of the solar nebula on the timescale of∼ 10 6–10 7 yr. This scenario is appealing because it can also naturally account for the limited amount of gas in Neptune's envelope. For self-consistency, we show that it is possible for proto-Neptune to acquire its core and envelope mass within the characteristic persistence timescale of protostellar disks (∼ 10 6–10 7 yr) with an inferred solid material/gas surface density comparable to/less than those of the minimum-mass nebula, respectively.(2) During its initial buildup, proto-Neptune's core not only collided and coagulated with residual planetesimals but also underwent close scatterings with large-angle deflection. We demonstrate with numerical simulations that such a process may lead to the expansion of its orbit over a few 10 6 yr. The asymmetrical planetesimal distribution that drives this migration is self-sustained by the planetesimal scatterings and the migration. In other words, the migration occurs without help of other giant planets, unlike the migration models of other authors (eg, Fernandez & Ip; Hahn & Malhotra) which rely on planetesimal depletion due to ejection by the strong gravitational effects of proto-Jupiter and proto-Saturn. The main advantages of this alternative scenario are that (1) it provides a fresh replenishment of residual planetesimals into the feeding zone such that proto-Neptune may acquire a core more massive than the isolation mass within∼ 10 7 yr and (2) resonant trapping may lead to a natural termination of both proto-Neptune's planetesimal accretion and its orbital migration, determining its present core mass and position in a self-consistent manner.