The county was formed in 1855 from Cumberland County. It was named for Cornelius Harnett. The county seat is Lillington.
Harnett County is surrounded by Lee County to northwest, Wake County to the north-northeast, Chatham County to the north-northwest, Moore County to the southwest, Sampson County to the southeast, Johnston County to the east, and Cumberland County to the south.