Neymar is at the Circuit de Catalunya as a guest of Red Bull, a rival of Hamilton's Mercedes team, but managed to visit his friend shortly after the Spanish national anthem had finished playing on the grid, which happens just before the start of the race.
The Paris Saint Germain striker gave the five-time world champion a hug and a pat on the back to send him off.
The good luck message clearly worked a charm -- not long later, Hamilton beat Mercedes teammate Valtteri Bottas on the long run down to Turn 1 to lead the race. He went on to claim the victory, which moved him back into the lead of the F1 world championship after five races of 21.
Earlier PSG and Brazil team-mate Dani Alves had joined Neymar on a visit to the Red Bull garage, where they enjoyed a chat with driver Pierre Gasly and took photos with team principal Christian Horner.
It's not the first time Neymar and Hamilton have crossed paths in a motor racing capacity -- they hung out together earlier this year after Hamilton visited the MotoGP race in Qatar. On that occasion, Neymar called Hamilton his "brother from another mother" in an Instagram post of their meeting.
While injury cut Neymar's season short earlier this year, Hamilton is at the beginning of his own -- the Spanish Grand Prix is the fifth race of 21 in 2019. If Hamilton can successfully defend his title it will leave him on the cusp of matching Michael Schumacher's all-time record of seven career championships.