Atomic-scale wetting governs material formation at the nanoscale but remains poorly understood under confinement, where classical capillarity models fail. The growth of metallic nanowires within multi-wall carbon nanotubes (MWCNTs) exemplifies this challenge, requiring precise control over wetting, nucleation, and vapour-phase condensation. Here we show that nanowire formation proceeds through a two-stage mechanism: curvature-driven nucleation at open tube ends followed by capillary-driven elongation sustained by continuous vapour condensation. Using in situ atomic-resolution transmission electron microscopy (ARTEM) coupled with a deep learning convolutional neural network (CNN) capable of classifying liquid, solid and intermediate SnxO phase transitions, we directly capture the cascade of thermally induced nanowire growth within CNTs. Growth requires a wetting interface (contact angle, θ <90°) between liquid SnxO and the nanotube wall-conditions not described by Kelvin or Lucas-Washburn models. These results establish a predictive framework for vapour-phase nanowire encapsulation, linking nanoscale wetting dynamics to the fabrication of advanced nanomaterials.