A North Carolina man accused of shooting a Danville Police officer in February pleaded guilty in court on Thursday.