Fortunately, the USS West Virginia was deliberately run aground during the Pearl Harbor attack, thereby saving one more capital ship to return to battle.
I believe it was the Nevada that managed to get under steam but beached when the captain realized they would not make open water.
That was not West Virginia. USS Nevada BB36 was able to get under way during the attack. She was hit with one torpedo and 6 bombs she beached herself to keep from sinking in the channel. West Virginia was moored at the time she was hit with at least 6 torpedoes. She sank an even keel. Had it not been for some quick action to counter flood her inboard tanks, she would have rolled over like Oklahoma did.
USS Nevada is the one that got up steam, but beached rather than chance sinking in the main channel.