Alexander James O'Connor received his secondary schooling in Stellenbosch and passed the matriculation examination of the University of the Cape of Good Hope in 1901. He was employed in the Forestry Department of the Cape Colony in April 1903 and a few years later was chosen for training at the South African School of Forestry at Tokay, where he qualified in 1908. Subsequently he was employed as assistant district forest officer in the Western Cape, Transkei, the Knysna region, and from April 1912 in the Transvaal. For many years his headquarters was at Woodbush, a forest reserve near Tzaneen, where he was a pioneer of afforestation with conifers. In 1927 he was appointed conservator of forests for Natal. He was promoted to deputy director of forestry in 1936, and in 1942 to director of forestry, a post he held until his retirement in December 1944. He then settled at Magoebaskloof as a forestry consultant. The tree species Ochna oconnorii was named in his honour.
O'Connor was an outstanding administrator. He also had a flair for quantitative analysis of data, which enabled him to develop Correlated Curve Trend (CCT) research projects in 1935. These projects provided valuable information, both to the Department of Forestry and indirectly to private plantation owners, on the initial spacing and thinning regimes in pine plantations. He described his work in a report entitled Forest research with special reference to planting distances and thinning (1935). Other publications by him dealt with 'Sylvicultural investigation of the black wattle (Acacia mollissima Willd)' (with I.J. Craib, South African Journal of Science, 1929), 'The value of an immature plantation' (Journal of the South African Forestry Association, 1941), 'Sawmilling policy in relation to timber produced by the State' (Ibid, 1949), and 'Valuation of plantations' (Empire Forestry Review, 1957).
O'Connor served as president of the South African Forestry Association from 1942 to 1945 and was elected an honorary vice-president in 1948. He became a member of the Royal Society of South Africa before or in 1910, but his membership lapsed after a few years. A species of non-marine mollusc, Trachycystis oconnori, was named after him. He was married to Helena Aletta Fauconnier, with whom he had four daughters.