Specifically, the verse goes as follows "Bonaparte has given us the example of how we should prevail".
During the Napoleonic wars the Polish allied themselves with the French Emperor against Prussia, Austria and Russia, who have been subjugating Poland for the last century.
Following the destruction of the Holy Roman Empire, Napoleon created the Duchy of Warsaw in 1807, a semi-independent Polish state, which would have been imposible to establish without Napoleon’s aid. The duchy fell along with Napoleon after Waterloo in 1815.
To show the bond between Napoleon and the Polish, the Emperor formed the Polish 1st Light Cavalry Regiment as part of his Imperial Guard on 9 April 1807. The cavalry consisted entirely of Polish nobility and was one of the most effective military unit in the French Army.
The Polish 1st Light Cavalry Regiment fought in every campaign and battle between 1807 and 1815. From Spain to Russia, being one of the very few detachments which remained battle ready following the catastrophic retreat from the latter. It was at the end of the Russian campaign when part of the Polish 1st Light Cavalry Regiment was reformed into the 7th company of chevaulegers.
The chevaulegers followed Napoleon to the bitter end, taking part in the defence of France and in the “Hundred Day” campaign. After the defeat at Waterloo, the chevaulegers were forced out of the French army and returned home.
The original version of the Polish anthem, slightly different from the current one, but with the passage about Napoleon unchanged, has been written in July 1797, long before Napoleon's involvement in Polish territory. The song, adopted as national anthem only in 1927, has been initially known as 'Song of the Polish Legions in Italy'. Legions themselves were military formations created from Polish soldiers and officers who emigrated after the defeat of Kościuszko's Uprising and subsequent abdication of Stanisław I and the complete dissolution of the Polish-Lithuanian state. The most common destinations od the emigrants were Italy and especially France, where since 1794 The Agency, Polish political organisation aiming at restitution of the independent Polish state but rejecting idea of another insurrection, after the failure of the Kościuszko's attempt. Thanks to mediation between The Agency, Napoleon Bonaparte and the Transpadanian Republic established by Napoleon in 1796, the Legions were formed and joined French forces in the Italian campaign (Rimini, Garda Lake, Rome, Civita Castellana) and since 1799 they were fighting the forces of the 2nd Coalition. Although significant part of the legionnaires were sent to pacify the uprising in Santo Domingo after many Polish soldiers became disillusioned with the little effect of their efforts, the legionnaires were still fighting with Napoleon who was treated as the greatest ally of Polish cause until his ultimate defeat in 1815.
It should be noted that until 20th century, the song was a popular song in the military and among supporters of Polish independence, but it wasn't an anthem in any capacity. This changed after Poland regained the independence in the wake of the Great War. The formation of short-lived Duchy of Warsaw, the fact that during Napoleonic Wars France managed to consistently defeat countries responsible for dissolution of Poland and the general sympathy shown by Napoleon towards Poles (despite some opinions that he treated Poles instrumentally, an independent Polish state was undoubtedly compatible with his European policy) and generally favourable opinions about the Emperor of the French among Poles (also quite common in modern times) caused the original text about Napoleon to remain in the later versions of the song, including the one accepted as an anthem currently.