The earliest citation I can find is Marion Harland's Alone (1856), but I don't suppose it's an "origin".
Free, white, and twenty-one" sang Emma, cheerily. "Twenty-one! In four years, I shall be a spinster of a quarter of a century!"
The fact that it was well-established long before OP's 1930s movies is attested by this sentence in the Transactions of the Annual Meeting from the South Carolina Bar Association, 1886
And to-day, “free white and twenty-one,” that slang phrase, is no longer broad enough to include the voters in this country.
There were still black slaves in some states in the mid 1800s, so obviously being free and white was a meaningful part of "I can do what I want and no one can stop me". But unless it refers to the "freedom" to vote, I don't know what the significance of reaching 21 would have been at the time.