Он должен был, скрывая свое имя, остаться в Москве, встретить Наполеона и убить его с тем, чтобы или погибнуть, или прекратить несчастье всей Европы, происходившее, по мнению Пьера, от одного Наполеона. - Война и мир (Толстой)/Том III/Часть III/Глава XXVII
As usual on Lit.SE, all translations from Russian in my answers are my own unless specified otherwise:
... Kill him (Napoleon) in order to either perish, or to end the misfortune of the whole of Europe, which, according to Pierre, originated from Napoleon alone - Tome III/Part III/Chapter XXVII.
Basically, Pierre - likely on or after Borodino battle - realized that - as William Tecumseh Sherman said in another context, "War is hell", and that Napoleon was a tyrant who was the source of violence and death in all of Europe.
He explicitly called Napoleon a "Villain" in his head:
Пьер точно так же считал полезным и достойным убить злодея; Т. III/Ч.III/Глава XXIX
Pierre still considered it beneficial and worthy to kill the villain... - Chapter XXIX
Additionally, Pierre was (like many figures trying an assassinations), basically delusional, convinced that he was personally "A hand of Providence", acting on behalf of "everyone".
«Да, один за всех, я должен совершить или погибнуть! — думал он. — Да, я подойду… и потом вдруг… Пистолетом или кинжалом? — думал Пьер. — Впрочем, все равно. Не я, а рука провидения казнит тебя, скажу я (думал Пьер слова, которые он произнесет, убивая Наполеона). - Глава XXVII
“Yes, one for all, I must achieve this or perish! He was thinking. - Yes, I'll come closer ... and then suddenly ... a pistol or a dagger? Thought Pierre. - Regardless, all the same. 'You will be executed not by myself, but the hand of Providence', I will say (Pierre thought of the words he would utter when killing Napoleon). - Chapter XXVII again
There were additional factors (Pierre's "spiritual" view that material wealth and possessions are irrelevant, Masonic views) but the above were the main reasons in his thinking.