In the letter, posted on McCartney's official website, the musician cited his long association with Russia, including an outdoor concert in Red Square in 2003. On that occasion, Putin gave McCartney a personally guided tour of the Kremlin.
McCartney told Putin he hoped they would meet again, "when our schedules allow."
He said Greenpeace, which stages direct-action protests against alleged environmental offenders around the world, was nonviolent and "most certainly not an anti-Russian organization. In my experience they tend to annoy every government!"
"I understand of course that the Russian courts and the Russian presidency are separate," McCartney wrote. "Nevertheless I wonder if you may be able to use whatever influence you have to reunite the detainees with their families?"
An outspoken vegetarian, McCartney has long supported environmental causes, and he has opposed drilling for oil in the Arctic.
He also was one of several international celebrities who last year urged Russia to free two members of punk protest group Pussy Riot. They remain in jail.