Famous writers who were also lawyers or involved in law include Henry Fielding, John Donne, Francis Bacon, Johan Wolfgang von Goethe, E.T.A. Hoffman, Heinrich Heine, Franz Kafka, Alexander McCall Smith, William Faulkner, and Bernhard Schlink, to name but a few.
Literature can tell stories of the law and of lawyers, whether to entertain, educate, or make some kind of change. General surveys of where law or lawyers appear in literature are detailed below.
Subject searching in SOLO:
You can find more on law in literature by using these subject headings and limiting your search to 'My exact phrase' in 'in subject'.
Lawyers in literature
Justice in literature
Or (for example)
Human rights in literature
Social justice in literature
There are plenty of novels that use law in their plots, a selection of which are below. There's also plenty of journal articles for further reading on these legal plot points, including such whimsically titled articles as Pride and Prejudice and Proof: Quotidian Factfinding and Rules of Evidence.