Samajwadi Party leader Akhilesh Yadav was detained by police in Unnao while he was on his way to Auraiya to attend a protest rally on Thursday.