The immediate historical and social context of King's "Letter from Birmingham City Jail" is all-important here. He wrote the letter in direct response to a group of white Southern clergymen who'd strongly criticized the tactics of the civil rights movement. They'd argued that staging protests and sit-ins at segregated lunch counters was both counter-productive and illegal. They accused King and other civil rights leaders of fomenting disorder and in doing so showing disrespect for the rule of law. Instead of causing trouble, they argued that the civil rights movement should pursue its noble aims by exclusively legal means, obtaining equality through the courts and through negotiation with the authorities.
In his reply, King reminds the white clergymen that it is the duty of every Christian to stand up to injustice wherever it rears its ugly head, and that in some cases this will inevitably involve breaking the law. He goes on to remind his critics that African Americans have been subjected to unjust treatment by the courts. And as for negotiation, strenuous efforts were made by the civil rights movement to negotiate with the Birmingham city authorities, but their overtures were always rebuffed. That being the case, the civil rights movement had little choice but to engage in direct, non-violent action as a way of obtaining equality and justice.