It was narrated from Ibn ‘Abbas that the Messenger of Allah (ﷺ) acquired his sword Dhulfiqar, from the spoils of war on the Day of badr.
Sunan Ibn Majah Book 24, Hadith 56