Zachariah is the Seahawk's cook, surgeon, and only black man. Originally from Africa, he is around 50 years old (the oldest on the ship), cannot read, and knows very little about Christianity (8.22). (He does like the story of Jonah, though.) He's also, as it turns out, Charlotte's closest ally on the Seahawk. Zachariah gives Charlotte the dirk (a knife) for protection and sews for her a miniature set of sailor clothes. Unlike Captain Jaggery or her father, Zachariah presents himself not as Charlotte's superior, but as her equal. He becomes a trustworthy friend and a loyal mentor. As he's the one singled out and punished for the crew's mutiny, Zachariah also becomes a compelling figure of sacrifice who is later resurrected.
The friendship between Zachariah and Charlotte is founded on their position as outsiders both in nineteenth-century society and the society of the Seahawk. And Zachariah reminds us of this fact:
"Miss Doyle is so young! I am so old! Surely there is something similar in that. And you, the sole girl, and I, the only black, are special on this ship. In short, we begin with two things in common, enough to begin a friendship." (2.80)
Zachariah's age and experience is juxtaposed with Charlotte's youthful vigor and idealism.
There's also the matter of their race and gender. As the only woman and the only black person, Charlotte and Zachariah share a compromised legal status. Both would have had limited rights to their persons and property under the law. This is hinted at in more than a few places in the novel. For example, remember when Charlotte compares herself to a bale of cotton in the beginning of the novel (2.9)? Well, Zachariah's ancestors and relatives almost certainly would have been shipped around like bales of cotton.
The alliance between Zachariah and Charlotte, a black man and a white woman, is not historically inaccurate. There's a significant historical precedent for a legal connection being drawn between women and slaves. The Mansfield Judgment was a court case decided in 1772 in which a black slave, James Somersett, won his freedom against his master, Mr. Stewart of Virginia. In the ruling it was declared that slavery was illegal in England and so Somerset was made a free man. The state of slavery, it was argued, was not natural, but was a legal designation. In this sense, the court argued, slavery was very much like marriage. Drawing the connection between women's position in marriage and the enslavement of black people would become a common theme in much of the literature of the period. (For reference and further reading see: Anne K. Mellor and Richard E. Matlak, "Slavery, The Slave Trade, and Abolition in Britain," British Literature: 1780-1830, 53.)
Zachariah is not a slave and never has been, so let's be clear: he's a free man in England and would also be considered free in Rhode Island, the Seahawk's destination. The novel, though, does make use of some of the images of slavery to critique the tyrannical Captain Jaggery. One of the best examples from the book is in Chapter 11, when Zachariah becomes the sacrificial scapegoat who gets punished for the mutiny. In this horrible episode, Zachariah is strung up and mercilessly whipped by Mr. Hollybrass and Captain Jaggery. The images of violence are familiar ones that we might remember from other depictions of slavery in other books and contemporary television and film. The abuse of Zachariah's body is very graphic: "Hollybrass cocked his arm. Again the wrist twisted. The whip struck. Zachariah's body gave a jerk. Four red welt lines crossed the first" (11.42). The atrocity Charlotte witnesses urges her to action and cements in her mind the cruelty of Captain Jaggery.