An electronic device comprises: a housing; and a camera module including: a barrel and a plurality of lenses, wherein the plurality of lenses comprise at least one other lens and a first lens disposed closest to the opening and having a first outer diameter, wherein the first lens includes: a lens portion, forming an effective area of the first lens, the lens portion exposed to the opening; a connecting portion, forming a portion of an ineffective area of the first lens, extended from the lens portion and inclined at an angle in a first direction away from the lens portion; and a flange portion, forming another portion of the ineffective area of the lens portion, extended from the connecting portion in a second direction substantially perpendicular to a stack direction of the plurality of lenses, wherein the barrel includes: a head portion containing the opening and having a second outer diameter, a body portion extended from the head portion, accommodating the at least one other lens of the plurality of lenses, and having a third outer diameter greater than the second outer diameter; and an engaging portion formed in the inner space of the barrel and engaged with the flange portion, wherein the first outer diameter of the first lens is greater than the second outer diameter of the head portion.