Yes, there were actually early films that depicted African Americans in roles other than that of mammy, maid, slave, or Mr. Bojangles.
This 1920 Oscar Micheaux silent is one of the most respected films in African American cinematic history. The film follows the trials of Sylvia, a southern African American educator who travels north to raise funds for her school.
This film was written, directed, and produced by an African American, Micheaux. The cast is comprised mostly of African Americans. A lot of the characters have professional careers, in fields such as medicine, education, and engineering.
In addition, there are story developments in this film that you would never have seen in the mainstream industry at the time. For example, there is a philanthropic white woman who wants to donate money to Sylvia's school, but is talked out of it by another white woman, who warns her of the dangers of educating blacks. Instead she wants her friend to donate her money to an Uncle Tom-like preacher who isn't exactly a promoter of the betterment of his race. There is also a scene in the movie where it is revealed that Sylvia is the daughter of a white man (who was in the process of attempting to rape her when he realized who she was) and another where a lynching takes place. As if this weren't enough, the film also explores the complicated dynamics of the African American community, with a dichotomy between the stereotypical black criminal and the law-abiding members of the African American community.
This film is revolutionary. You will not see many like it in the mainstream productions of the period. A must see.