Gregg relocated to northwest Arkansas from Moulton, Alabama as a child in 1835. After growing up on a Washington County farm, Gregg read law in Fayetteville, Arkansas and passed the bar exam, rising to become a prominent attorney in town. During the Civil War, Gregg was in charge of the Fourth Arkansas Cavalry (Federal) He was elected to the Arkansas House of Representatives after the war, later becoming the prosecutor for the Fourth Circuit, Chancellor of the Pulaski Chancery Court, and an associate justice on the Arkansas Supreme Court. Gregg also secured support for locating the Arkansas Industrial University in Fayetteville (now known as the University of Arkansas). Following its founding in 1871, Gregg was elected to the Board of Trustees. Gregg also became president of the Bank of Fayetteville and was defeated in a gubernatorial bid by Simon Pollard Hughes, Jr. Following his death in 1891, courts, businesses, banks, and the university all closed on the day of Gregg's funeral. He is buried in nearby Evergreen Cemetery with several other influential Fayetteville residents.
The Gregg House in Fayetteville, Arkansas, is named for him.