A buy-in, in the context of short selling, is a case of the buy-in procedure in which a broker purchases shares in the market to close out a customer's short position, without the customer's consent, because the shares needed to support the position are no longer available. The main entry describes buy-ins for failed deliveries in general.
Short selling depends on borrowed shares. The lender may ask for them back at any time, an event handled as a securities lending recall. If the broker cannot find replacement shares to borrow, it must return the originals by buying them, and the cost is charged to the short seller's account. A buy-in can also follow a settlement failure, where the shares sold short were never delivered. In the United States, Regulation SHO requires such fails to be closed out within a set number of days.
The short seller has no control over the timing or the price. Buy-ins are most likely in shares that are heavily shorted and scarce to borrow, and forced purchases in such shares can add to the upward pressure of a short squeeze. High borrowing fees and a high days to cover figure are warning signs.