We have investigated magnetic and dielectric properties of rhombohedral 3R-AgFeO2 and hexagonal 2H-AgFeO2, by using magnetic and dielectric bulk measurements and neutron diffraction experiment with single crystals grown by a hydrothermal synthesis. Magnetic phase transitions occur at T =14.0 K and T =6.0 K in 3R-AgFeO2, and T =17.0 K and T =9.5 K in 2H-AgFeO2 under zero magnetic field. Multistep metamagnetic phase transitions were observed in 3R-AgFeO2 in magnetization measurements up to 60 T, while a single phase transition occurs in 2H-AgFeO2. The ferroelectric polarization parallel and perpendicular to the triangular lattice plane appears below T = 6.0 K in 3R-AgFeO2, which is concomitant with onset of the cycloid magnetic ordering with the propagation vector k = (− 1 2 , q, 1 2 ; q ≃ 0.2) and the magnetic point group polar m1 ′. On the other hand, the ferroelectric polarization is absent even below the lower phase transition temperature in 2H-AgFeO2, which can be explained by the proper screw magnetic structure with k = (0, q, 0; q ≃ 0.4) and the nonpolar 2221 ′ point group. Although the two dimensional triangular lattice layers of Fe 3+ are common in the two polytypes, the magnetic and ferroelectric properties are significantly different. The emergence of ferroelectric polarization which is not confined to be within the plane of cycloid for 3R-AgFeO2 can be explained by the extended inverse Dzyloshinskii-Moriya effect with two orthogonal components, p1 ∝ rij × [Si × Sj] and p2 ∝ Si × Sj. Unlike other delafossite compounds, the p2 component is not allowed in the proper screw phase of 2H-AgFeO2 due to the symmetry restriction of the parent space group.