You should be able to remove the passcode by restoring the device. Do the following:
- Connect the device to the computer to which you normally sync;
- Open iTunes (Note: If iTunes prompts you to enter the passcode, try another computer that you have synced with. Otherwise, go to "If you have never synced your device with iTunes" in http://support.apple.com/kb/ht1212 )
- Right-click the device in the left column of iTunes and select Back up (read this article on how to restore http://support.apple.com/kb/HT1766 )
- When the backup is complete, select Restore
- When finished, restore from your most recent backup
To restore read the restore section in this article http://support.apple.com/kb/HT1766
If that doesn’t work you will need to perform a factory restore to remove it.