The Hard Way (tm)
For the Nokia 51xx series, this trick doesn't work. You need to put the phone into programming mode as described in Changing the Alpha Tag on Nokia Phones (put in *3001#nnnnn#, where nnnnn is your five-digit security code. The default is 12345).

From the programming screen you have a menu that looks like this:
  • NAM 1
  • NAM 2
  • Security
  • Emergency
  • SW Version
  • Serial No.
  • Programmed
  • Field Test

Select "Serial No." The only way to exit the programming menu is to power the phone off, then back on.

The Easy Way
Turn the phone off, and remove the battery. The ESN is on that silver label under the battery.