Google returns this:
How To: Unlock a Locked iPod
My friend recently locked her iPod, and forgot her passcode. After searching the internet, she came up with
this link telling her that there is effectively no way to unlock a locked iPod. Wrong!
After doing some digging around inside the iPod, I couldn't find anything. However, enabling hidden folders brought up a new folder: iPod_Control. Inside this folder was another named Device, and inside this was a file named _locked. Opening up this file in Notepad, I found a bunch of symbols, I assume this was an encrypted password. I simply deleted the file, and the iPod was unlocked! This worked for me, but after further research, I found out that the fix for this problem depends on what type of iPod you have. However, the following set of steps should work for everyone.
1) First rename the _locked file to _unlocked. Disconnect the iPod and
reset it.
2) If that did not solve the problem, delete all the text inside the aforementioned file. Save it, and then disconnect the iPod and reset it.
3) If that still did not work, delete the file and then disconnect the iPod and reset it.
Keep in mind that this is not an Apple-sanctioned guide, so use caution when trying this, and if you are not sure of what you are doing, backup any files before you alter or delete them