Homochirality is a common feature of amino acids and carbohydrates, whose origin is still unknown. For example, 19 of 20 natural amino acids are L-chiral but deoxyribose sugars in DNA are always D-chiral. Meanwhile, right-handed helices are ubiquitous in nature. Are these two phenomena intrinsically correlated? Here, we propose that homochirality of amino acids and nucleotide sugars is originated from the handedness of helices. We show that right-handed 310-helix and alpha-helix favor the L-chiral form for amino acids, but for deoxyribose sugars right-handed helices prefer the D-chiral form instead. Our analyses unveil that there exist strong cooperativity effects dominated by electrostatic interactions. This work not only resolves the mystery of homochirality by providing a unified explanation for the origin of homochirality in proteins and DNA using helical secondary structures as the root cause, but also ratifies the Principle of Chirality Hierarchy, where chirality of a higher hierarchy dictates that of lower ones. Possible applications of the present work to asymmetric synthesis and macromolecular assembly are discussed.