Born in New York City, after he graduated from high school, he began writing songs and vaudevilles. An important event was his meeting with the composer Harry Von Tilzer in 1898. The two began a songwriting partnership that lasted almost 30 years.
Others that Sterling collaborated with include Arthur Lange, Gus Edwards, Bernie Grossman, M. K. Jerome, William Jerome, Frederick Allen Mills, his brother Raymond Sterling, Ray Henderson, Edward Moran and Bartley Costello.
Sterling wrote the songs Meet Me in St. Louis, Louis in 1904 and Wait 'Till the Sun Shines, Nellie in 1905. He wrote the song America, Here's My Boy for the Peerless Quartet in 1917 in the aftermath of U.S. entry into World War I in April 1917. He wrote On the Old Fall River Line with Von Tilzer and W. Jerome. He worked with Von Tilzer on the classic Pick Me Up and Lay Me Down in Dear Old Dixieland. Other songs for which Sterling wrote the lyrics in whole or part include After the War is Over (1918) and When My Baby Smiles at Me (1920).
Sterling died in Stamford, Connecticut on August 11, 1955.
He was inducted into the Songwriters Hall of Fame in 1970.
- with Von Tilzer, My Old New Hampshire Home, 1898
- with Arthur Lange, A Mother's Prayer for Her Boy Out There, New York: Joe Morris Music Co, 1917. OCLC 892504792
- with Arthur Lange, America, Here's My Boy, New York: Joe Morris Music Co, 1917. OCLC 9892806
- with Von Tilzer and W. Jerome, On the Old Fall River Line
- with Von Tilzer, Pick Me Up and Lay Me Down in Dear Old Dixieland
- Von Tilzer, Harry, and Andrew B. Sterling. Under the American Flag. New York: Harry Von Tilzer Music Pub. Co, 1915. OCLC 40708342
- Wait 'till the Sun Shines, Nellie, 1905
- with Arthur Lange, What'll We Do With Him Boy's? New York: Joe Morris Music Co., 1918. OCLC 40913604
- with Arthur Lange, Bernie Grossman, and Starmer. We're Going Over the Top. New York: Joe Morris Music Co, 1918. OCLC 47374626
- Von Tilzer, Harry, and Andrew B. Sterling. You'll Have to Put Him to Sleep with the Marseillaise and Wake Him Up with a Oo-La-La. New York: Harry Von Tilzer Music Co., 1918. OCLC 892505011
- with Charles B Ward, Strike Up The Band (Here Comes a Sailor)
- Hischak, Thomas S. The Encyclopedia of Film Composers, London: Rowman & Littlefield, 2015, page 420, ISBN 978-1442245495.
- Jones, John Bush. Reinventing Dixie: Tin Pan Alley's Songs and the Creation of the Mythic South, Baton Rouge: Louisiana State University Press, 2015, page 115, ISBN 9780807159446.
- Jones, John Bush. Reinventing Dixie: Tin Pan Alley's Songs and the Creation of the Mythic South, Baton Rouge: Louisiana State University Press, 2015, pages 149-153, ISBN 9780807159446.
- "Andrew B. Sterling | Songwriters Hall of Fame".
- Sheet music for his song "Under the Anheuser Bush" from the collection of the San Francisco Public Library
- Words and music for "Strike Up the Band (Here Comes a Sailor)" written with Charles B. Ward in 1900
- Andrew B. Sterling recordings at the Discography of American Historical Recordings.