Varys was sending out letters across the land about Jon being the rightful heir. That was his treason (he didn't disappear after that, which doesn't make sense, but ¯\_(ツ)_/¯).
However, when Greyworm came for him, he was reading a response from someone, and then burned it.
THEORY TIME!
It was a response from Howland Reed, who was confirming that he will show up in King's Landing to back up the claim that Ned Stark took Lyanna Stark and Rhaegar Targaryen's infant child, and rightful heir to the Iron Throne, from the Tower of Joy, and that said child is Jon Snow, actually named Aegon Targaryen.
Bran knows, and Sam corroborated via maester's scroll, but Dany could tell everyone at her victory coronation that it's a misinformation campaign... it's key that someone who KNOWS via first-person account would show up to back Jon's claim, should a situation arise where Jon decides to stake his claim, against his own will (aka, when the prospective Queen has decided to burn hundreds of thousands of innocent people for no reason, so you gotta step up and take the throne just so she can't have it, so you can then give up that same throne almost immediately).
Howland Reed is Expert Witness #1 being called to the stand in Dany's coronation/trial.