The pair had appeared together in ITV's 2018 documentary programme The Queen's Green Planet, sharing a rarely-seen informal side to the monarch.
Watch the clip here:
The beloved natural historian and broadcaster, who was knighted back in 1985, had become a close friend of the Queen's over the years.
By the looks of things, the pair shared a strong relationship, and could get a laugh out of each other - something that the public didn't often get to see from Her Majesty.
During filming for the ITV documentary, the Queen and David Attenborough enjoyed a stroll through the Buckingham palace gardens, discussing trees, when she cracked a joke.
"There will be all kinds of different trees growing here in another 50 years, maybe", suggested Attenborough, to which the Queen replied: "There might easily be, yes. I won't be here though."
Later on in the conversation, David pointed to a sundial that had been 'neatly planted in the shade'.
Cracking a smile, the Queen turned to her head gardener, asking: "Had we thought of that? It wasn't in the shade originally, I'm sure. Maybe we could move it."
A video of the precious interaction resurfaced online this week, as members of the public looked back on their favourite moments from the late monarch.
Sharing the video on Twitter, one person wrote: "I've watched this about a hundred times since yesterday, it's just so gorgeous.
I love that, 'Maybe we could move it?' - a very clear and firm instruction, even and admonition, tactfully framed as an idea. The epitome of wearing authority lightly."
Another tweeted: "One of my favourite moments of Queen Liz! She really did have a fantastic sense of humour."
And a third added: "Just two soon-to-be 96 year olds, sharing a joke about trees."
I've watched this about a hundred times since yesterday, it's just so gorgeous. I love that, "Maybe we could move it?" – a very clear and firm instruction, even and admonition, tactfully framed as an idea. The epitome of wearing authority lightly. https://t.co/SRHyuBMDbM— Hugh Smithson-Wright (@HRWright) September 9, 2022
One of my favourite moments of Queen Liz! She really did have a fantastic sense of humour https://t.co/QOhAzqv6ng— Nikita (@AndareVeloce) September 8, 2022
Following the Queen's passing, Sir David paid a moving tribute, remembering her for her "extraordinary ability to put you at your ease."
He said: “If there was a technical hitch, she wanted to know what it was, and if it had a funny side, she was quick to see the joke.
"Yet not for one second could you forget that you were in the presence of someone who had willingly accepted enormous responsibility and dedicated her life to serving the nation - that you were, in short, in the presence of royalty. The whole nation is bereaved."