Transforming Objects Into Other Ones
Best bet is to use the Cast Modifier to morph the cylinder into a sphere shape. 

The trick to get it to work well is:


Have a good number of evenly spaced edge loops along the cylinder length as well as concentric edge loops on both caps
Then set the mesh surface shading to Smooth and add a 1 level Subsurf Modifier before the Cast Modifier
Select Sphere as the cast type and then you can keyframe the Factor from 0 to 1
You may need to increase the Radius amount if the cylinder is longer than my example.