Put the iPhone into recovery mode and then connect to iTunes to restore the iPhone. If Find My iPhone is enabled on the device, try logging in to the iCloud account and then use Find My iPhone service to erase the iPhone. Alternatively, make use of a tool called Joyoshare iPasscode Unlocker. Such a tool can unlock any locked iOS device without passcode.