It was most certainly part of the Napoleonic Wars. The United States was allied to the French, and France was their main trade partner. Britain was at war with France, and did not want the United States trading with France. Britain intercepted a number of American trading vessels, looted them, and sometimes forcibly conscripted the sailors and ships into the British navy. The United States was outraged at this, and although a number of small skirmishes had already taken place, formally declared war.
There were a number of other factors in play as well, but that's the most condensed version.
Firstly, Napoleonic France and the US were not allies and they weren't good trade partners. In fact non-intercourse (a ban on trade and diplomatic relations) had been declared against France (and really the whole world) by the Embargo Act of 1807. Non-intercourse was again declared against France by the Non-intercourse Act of 1809. Trade was only re-established between France and the US in 1810 by Macon's Bill Number Two, which promised non-intercourse against Britain if the French agreed to stop harassing American shipping, or the same against France if the British agreed. The French agreed with no real intention of making good (that year, the French captured more American shipping than the British). The only reason Madison continued trade even after France broke it's promises was because they had no other choice. Non-intercourse against both European powers proved disastrous to the US economy.
Secondly, the British didn't care if the US traded with France. During the French revolutionary wars the British had declared it illegal for neutral ships to carry French cargo, but turned a blind eye to American ships doing so. Even after the British blockaded the English Channel and the North Sea in 1805, they continued to allow American ships (and only American ships) through, with the full knowledge they were likely headed to French ports.
Finally, it was illegal for the British to loot American ships. They could seize them, but they couldn't actually loot them. The impressment of American nationals by the Royal navy was also illegal and seemingly very rare. The majority of the cases of it the US government was able to cite were fabricated.
Actions of the British and the Royal Navy had very little to do with the declaration of war against the UK. The war was motivated almost entirely by desire to annex Canada, which was crushing the US economically and was doing so well there was very little desire for American goods over Canadian goods aboard.
So the war had very little to do with Napoleon, who was not an American ally in any sense and hardly traded with the Americans. I fail to see how it qualifies as a part of the Napoleonic Wars, 'Napoleonic' being the key word.