Hadith 1573B2

Imam Malik, may Allah have mercy on him, said that if a person steals property equivalent to a quarter of a dinar, and then returns the stolen property to the owner, his hand will still be cut off. Its example is like a person who has drunk an intoxicating substance and its smell comes from his mouth, but he is not intoxicated; even then the prescribed punishment will be given, because he drank it for the sake of intoxication, even if he did not become intoxicated. Similarly, the thief's hand will be cut off even if he returns the item to the owner, because he stole it with the intention of taking it away, even if he did not actually take it away.
Hadith Reference موطا امام مالك رواية يحييٰ / كتاب السرقة / 1573B2
Hadith Takhrij «فواد عبدالباقي نمبر: 41 - كِتَابُ الْحُدُودِ-ح: 31»