A months-long narcotics investigation led to the arrest of a man with a criminal history dating back nearly 20 years.