As long as the listing is still active,you can end the listing any time you want. If there are any bids on the item,you have to cancel the bids first. If you don't you are deemed to have sold the item to the high bidder at the time. In that case,if you don't ship, you may find the buyer opening an item not received dispute against you.
If the item has ended with a winning bidder you are required it ship the item to the winning bidder for the final bid price plus the shipping cost. If you don't,you face the risk of a dispute being opened against you as previously mentioned.