Yes, it is illegal. By leaving his bike at your house with our knowledge a legal bailment was created. This means you had a duty of care in regard to that bike. While the exact circumstances may define the extent of the bailment and limit your duty, it will never drop below that of ordinary care. Destroying it is not acceptable. In court you would owe restitution for the value of the bike. However, if he refused to come get it, that may constitute abandonment, but good luck arguing that.