In April 2013, two members of one family were successively confirmed as cases of avian influenza A(H7N9) virus infection in Shanghai, China. Respiratory specimens from the two cases and their close contacts were tested using real-time reverse-transcription (RT)-PCR. Paired serum specimens from contacts were tested by haemagglutination inhibition assay and microneutralisation test. The index patient developed severe pneumonia. Her husband presented with pneumonia shortly thereafter. Both cases had highly similar clinical features and infection with A(H7N9) virus was confirmed in both cases by genetic analysis. Phylogenetic analysis revealed a high level of similarity between the sequences from the two patients and environmental samples collected from wet markets in Minhang and Changning districts. Six samples from the Changning wet market were confirmed as A(H7N9) positive. Of 27 close contacts, one developed mild respiratory symptoms and another tested positive for A(H7N9) antibodies, but both were negative by real-time RT-PCR. The other 25 close contacts of both cases were A(H7N9) negative. Limited human-to-human transmission of the virus most likely occurred in the family cluster. However, other close contacts did not test positive for the virus, suggesting limited potential for extensive human-to-human transmission of the virus.