The unicellular cyanobacterium Candidatus Atelocyanobacterium thalassa (UCYN-A) is a key diazotroph in the global ocean owing to its high N2 fixation rates and wide distribution in marine environments. Nevertheless, little is known about UCYN-A in oxygen-deficient zones (ODZs), which may be optimal environments for marine diazotrophy. Therefore, the distribution and diversity of UCYN-A were studied in two consecutive years under contrasting phases (La Niña vs. El Niño) of El Niño Southern Oscillation (ENSO) along a transect in the ODZ of the Mexican Pacific upwelling system. Of the three UCYN-A sublineages found, UCYN-A1 and UCYN-A3 were barely detected, whereas UCYN-A2 was dominant in all the stations and showed a wide distribution in both ENSO phases. The presence of UCYN-A was associated with well-oxygenated waters, but it was also found for the first time under suboxic conditions (<20 μM) at the bottom of a shallow coastal station, within the oxygen-poor and nutrient-rich Subsurface Subtropical water mass. This study contributes to the understanding of UCYN-A distribution under different oceanographic conditions associated with ENSO phases in upwelling systems, especially because of the current climate change and increasing deoxygenation in many areas of the world's oceans.