Since there is a direct rail connection between the mentioned destinations, you can easily reach Berlin from Hamburg by train. Trains running on this route boast a saturated departure timetable and the whole ride takes around 2 hours.
How far is it from Hamburg to Berlin?
The distance from Hamburg to Berlin by train is 285 kilometers or 177 miles, respectively.