An electric nail gun comprising: a cylinder unit including a striking cylinder that surrounds a first axis and that defines a cylinder chamber, and a cylinder lid that cooperates with the striking cylinder to define a gas storing chamber, the gas storing chamber being adapted for storing gas, and communicating with the cylinder chamber, the cylinder lid including a passage that communicates with the gas storing chamber, that extends along a second axis, and that is at least partially surrounded by the gas storing chamber, the second axis being substantially orthogonal to the first axis, the cylinder lid having a lid wall that is spaced apart from the striking cylinder in an extending direction of the first axis, a surrounding wall that is connected to the lid wall and that surrounds the first axis, and a passage-defining portion that is formed between the lid wall and the surrounding wall, that surrounds the second axis, and that defines the passage; a nail-striking unit including a piston assembly that extends through the cylinder chamber, that is movable along the first axis, and that is adapted for striking a nail, the piston assembly being able to be driven by pneumatic power and electric power, the gas storing chamber being isolated from an external environment when the nail-striking unit strikes the nail; and a valve unit including a valve assembly (41, 43) that is accommodated in the passage, and that is operable to convert between a first state, in which the gas is allowed to flow between the gas storing chamber and the external environment through the passage, and a second state, in which the gas is refrained from flowing through the passage; characterized in that: the passage has a first hole section that is adjacent to the external environment and that is connected to the surrounding wall, and a second hole section that is located at one side of the first hole section opposite to the external environment and that is surrounded by the gas storing chamber, the valve assembly (41, 43) being mounted to the second hole section; and the valve unit further includes a fitting member, the fitting member being connected to the first hole section, being spaced apart from the valve assembly along the second axis, and cooperating with the valve assembly to define a pressure chamber, the fitting member being adapted to be connected to a gas-filling system, and being capable of guiding gas into the pressure chamber so that the valve assembly is urged by air pressure in the pressure chamber to allow the gas to enter the gas storing chamber through the passage. a cylinder unit including a striking cylinder that surrounds a first axis and that defines a cylinder chamber, and a cylinder lid that cooperates with the striking cylinder to define a gas storing chamber, the gas storing chamber being adapted for storing gas, and communicating with the cylinder chamber, the cylinder lid including a passage that communicates with the gas storing chamber, that extends along a second axis, and that is at least partially surrounded by the gas storing chamber, the second axis being substantially orthogonal to the first axis, the cylinder lid having a lid wall that is spaced apart from the striking cylinder in an extending direction of the first axis, a surrounding wall that is connected to the lid wall and that surrounds the first axis, and a passage-defining portion that is formed between the lid wall and the surrounding wall, that surrounds the second axis, and that defines the passage; a nail-striking unit including a piston assembly that extends through the cylinder chamber, that is movable along the first axis, and that is adapted for striking a nail, the piston assembly being able to be driven by pneumatic power and electric power, the gas storing chamber being isolated from an external environment when the nail-striking unit strikes the nail; and a valve unit including a valve assembly (41, 43) that is accommodated in the passage, and that is operable to convert between a first state, in which the gas is allowed to flow between the gas storing chamber and the external environment through the passage, and a second state, in which the gas is refrained from flowing through the passage; the passage has a first hole section that is adjacent to the external environment and that is connected to the surrounding wall, and a second hole section that is located at one side of the first hole section opposite to the external environment and that is surrounded by the gas storing chamber, the valve assembly (41, 43) being mounted to the second hole section; and the valve unit further includes a fitting member, the fitting member being connected to the first hole section, being spaced apart from the valve assembly along the second axis, and cooperating with the valve assembly to define a pressure chamber, the fitting member being adapted to be connected to a gas-filling system, and being capable of guiding gas into the pressure chamber so that the valve assembly is urged by air pressure in the pressure chamber to allow the gas to enter the gas storing chamber through the passage.