The Queen planted a sapling of Malta's national tree in the grounds of San Anton Palace.
The gharghar will grow next to an olive tree she planted 10 years ago during her last state visit to Malta in 2005.
Her Majesty and the Duke of Edinburgh had a private farewell with Malta's President Marie-Louise Coleiro Preca inside the palace.
The Queen was presented with a commemorative stamp which had been made from a photograph of her with the president.
"That's very nice, isn't it. That's very kind of you," she said as she inspected her gift.
Her Majesty, wearing a bright turquoise coat and hat, then made her way out to the gardens where she was shown the tree she had planted a decade ago.
"Ten years ago, was it? It's quite big," she exclaimed.
The Queen asked several questions about the tree, which is the only one of its kind in the palace gardens.
The royal couple, accompanied by the Prince of Wales and the Duchess of Cornwall, are on a three-day state tour of the island.