Thank you for the opportunity to help you with your question!
The planned attack on all whites in Charleston was an avenge by the black communicate slaves in order to buy their own freedom and eventually go back to Africa. Denmark Vesey had witnesed slave mistreatment and was eager to see such cruety come to an end. Vesey's views and ambitions were spurred by his work with the African Methodist Church, the only independent black church in Charleston at the time. Within the church, Vesey gave sermons and led lessons. As a literate man, he was looked upon as a teacher. His association with the AME Church gave him an outlet to express his views of equality.
Please let me know if you need any clarification. I'm always happy to answer your questions.