The effects of swirl and downstream wall confinement on an annular nonpremixed flame were investigated using direct numerical simulation (DNS). Fully three-dimensional parallel DNS was performed employing high-order numerical methods and high-fidelity boundary conditions to solve governing equations for variable-density flow and finite-rate Arrhenius chemistry. Three swirl numbers have been examined: 0 (without swirl), 0.4 and 0.8, while the effects of downstream wall confinement have been examined for swirl numbers 0 and 0.4. Results have been presented in terms of instantaneous and time-averaged flow quantities, which have also been analysed using energy spectra and proper orthogonal decomposition (POD). Effects of swirl on the fluid dynamic behaviour of the annular nonpremixed flame were found to be significant. The fluid dynamic behaviour of the flame is greatly affected by the interaction between the geometrical recirculation zone (GRZ) near the jet nozzle exit due to the annular configuration, the central recirculation zone (CRZ) associated with swirl, the unsteady vortical structures in the jet column due to the shear instability, and the downstream wall confinement. Depending on the degree of swirl, the GRZ near the burner mouth and the CRZ may co-exist or one zone may be overwhelmed by another. At a moderate swirl number, the co-existence leads to a flame with strong reaction attached to the burner mouth; while at a high swirl number, the CRZ dominates over the GRZ. The precessing vortex core was observed to exist in the swirling flow fields. The Nusselt number distribution of the annular impinging flames differs from that of round impinging jets. The POD analysis revealed that wall effects on the flow field are mainly associated with the higher mode numbers.