Leveling calibration must be done successfully or you will likely see this behavior.
You can test the proper calibration of the accelerometers in stabilize mode (which gives you direct throttle control).
Raise throttle very slowly and be ready to cut throttle immediately if it shows signs of wanting to tip over. You can also do this test with someone firmly holding onto the quad if they are VERY careful to remain clear of the props. The quad should resist being tipped from level. Fairly low throttle settings should be sufficient (and safer).
If it wants to pitch or roll away from level when the sticks are centered, you have a prop, motor, or flight controller problem.
If you are experienced, you could try flying in Acro mode which bypasses the autoleveling. Be forewarned though that Acro mode flys a lot like a helicopter and requires constant inputs and it will not self level when you release the sticks.