Phrase at sixes and sevens "hazarding all ones chances," is first in Chaucer, perhaps from dicing (the original form was on six and seven) and could be a corruption of on cinque and sice, using the French names (which were common in Middle English) for the highest numbers on the dice.
The Phrase Finder supplies that cite as follows:
The earliest citation in print is Chaucer's Troilus and Criseyde, 1374:
Lat nat this wrechched wo thyn herte gnawe, But manly set the world on sexe and seuene.
If things had stayed that way the origin of the phrase would be fairly cut and dried [...]. As we know though, it is now given as at sixes and sevens, having mutated via at six and seven, and the current meaning refers to a state of confusion, disorder or disagreement, not one of risk.
There's no question of these different versions arising independently, the movement from one to another was gradual and they overlap each other in time. The first appearance in print of at six and seven is in 1535 and the last citation of on six and seven in 1601. The first appearance of at sixes and sevens was in 1670, in Leti's Il cardinalismo di Santa Chiesa, translated [...] by G. H., 1670:
"They leave things at sixes and sevens."
Edit: in reply to your comments, the current meaning of the phrase is "in a state of disorder, confusion, dispute or disagreement" (see e.g. Merriam-Webster, Wiktionary, or the aforementioned Phrase Finder link).