The recent detection of the gravitational wave signal GW170817 together with an electromagnetic counterpart GRB 170817A from the merger of two neutron stars puts a stringent bound on the tensor propagation speed . This constraint can be automatically satisfied in the framework of massive gravity . In this work we consider a general SO ( 3 ) -invariant massive gravity with five propagating degrees of freedom and derive the conditions for the absence of ghosts and Laplacian instabilities in the presence of a matter perfect fluid on the flat Friedmann-LemaƮtre-Robertson-Walker ( FLRW ) cosmological background . The graviton potential containing the dependence of three-dimensional metrics and a fiducial metric coupled to a temporal scalar field gives rise to a scenario of the late-time cosmic acceleration in which the dark energy equation of state w _ { DE } is equivalent to -1 or varies in time . We find that the deviation from the value w _ { DE } = -1 provides important contributions to the quantities associated with the stability conditions of tensor , vector , and scalar perturbations . In concrete models , we study the dynamics of dark energy arising from the graviton potential and show that there exist viable parameter spaces in which neither ghosts nor Laplacian instabilities are present for both w _ { DE } > -1 and w _ { DE } < -1 . We also generally obtain the effective gravitational coupling G _ { eff } with non-relativistic matter as well as the gravitational slip parameter \eta _ { s } associated with the observations of large-scale structures and weak lensing . We show that , apart from a specific case , the two quantities G _ { eff } and \eta _ { s } are similar to those in general relativity for scalar perturbations deep inside the sound horizon .