This concept is a good one to do.
It was done brilliantly in a little known (and barely remembered) movie called "From the Hip" Staring Judd Nelson (Of breakfast club fame)
In that movie, an up and coming lawyer who doesn't quite play by the book discovers his client is guilty of the murder he is accused of.
this creates an obvious moral dilemma.
(SPOILER) The great conclusion of the story, the young lawyer, while pretending to prove his client is innocent gets him to act guilty on the stand. "He couldn't have done it, he's too weak to have killed anyone, he couldn't even hurt a fly! My client just doesn't have the guts to kill a human being." At which point the client attempts to hit the lawyer with the very murder weapon he used to kill the victim.
Just remember, as in "From the Hip" the Lawyer will probably get disbarred for not giving his client the best defense possible.