Original: In 1864 he moved to Naples, where he got a degree in law.
Simplified: In 1864 he went to Naples, where he got a degree in law.