He was born in Carrickfergus, Ireland, but left Ireland after the failure of the uprising of the United Irishmen in 1798 and moved to Princeton, New Jersey. He taught mathematics at various schools in the United States.
He is chiefly remembered for his formulation of the method of least squares, published in 1808. Adrain certainly did not know of the work of C.F. Gauss on least squares (published 1809), although it is possible that he had read A.M. Legendre's article on the topic (published 1804).
Adrain was an editor of and contributor to the Mathematical Correspondent, the first mathematical journal in the United States. Later he twice attempted to found his own journal, The Analyst, or, Mathematical Museum, but in both the 1808 and 1814 attempts it did not attract sufficient subscribers and quickly ceased publication. In 1825 he founded a somewhat more successful publication targeting a wider readership, The Mathematical Diary, which was published through 1832.
Adrain, Gauss, and Legendre all motivated the method of least squares by the problem of reconciling disparate physical measurements; in the case of Gauss and Legendre, the measurements in question were astronomical, and in Adrain's case they were survey measurements.