Yes, it is illegal to lie to or mislead the police conducting an investigation. It's called obstruction of justice and while it's rarely prosecuted in most jurisdictions, they can arrest you can bind you over for a trial if they believe that you are actively impeding an investigation.