I've been trying for an hour, searching everywhere, and i've found no solution.
To delete by _id, use remove() in MongoDB. Following is the syntax −
db.yourCollectionName.remove({_id:yourObjectId});