Basically purchase all the upgrades for the M4 throughout the game. In order to get all the achievements, you will need to unlock all four tiers of the Kruger Schmidt upgrade shop (convenient, you'll also earn some achievements that way). The tiers will be unlocked throughout normal gameplay. once the M4 is fully upgraded, play through a level and the achievement will unlock.
M4 Unlockables...
Ris Handguard - $50,000
Low Velocity Ammo - $50,000
Butt Stock - $50,000
Extra Ammo - $75,000
Laser Sight - $75,000
Rail Mount - $75,000
Armor Piercing Bullets - $75,000
Silencer Type 1 - $100,000
Pistol Grip - $100,000
Double Clip - $150,000
Red Dot Sight - $150,000
Silencer Type 2 - $200,000
Drum Magazine - $200,000
Scope Type 1 - $200,000
Total - $1,550,000
Quick side note - there is an extremely easy way to earn this and the other upgrade achievements pretty quickly. Once you have a decent amount of money (at the time I had about $2 million), fully upgrade any weapon. Then, play through a quick mission (I used "A New Life), but do not save afterwards. At the end of the level, the upgrade achievement will unlock. Turn off your system (or exit to the dashboard) and then start the game back up again. Load your most recent saved game, upgrade a different weapon, etc. Because the achievement locks right at the end of the level, you can reload the previous save file and you will still have the money you did before you played through.