ObjectiveThe government of Ghana has targeted universal access to safe drinking water by 2025 and elimination of open defecation by year 2030. This study explored the use of unimproved drinking water and unimproved sanitation and assessed their association with demographic factors.DesignThis was a secondary data analysis of the 2017 Ghana Maternal Health Survey, a nationally representative cross-sectional survey. Open defecation households were mapped to show regional differences. Weighted logistic regression was used to assess the association of demographic variables with use of unimproved drinking water and unimproved toilet facilities.SettingGhana.ParticipantsA total of 26 324 households were included in the analysis.Primary and secondary outcome measuresUse of unimproved drinking water and unimproved toilet facilities.ResultsOut of the 26 324 households, 8.9% used unimproved drinking water while 81.6% used unimproved sanitation. Open defecation was practised by 15.2% of Ghanaian households, with a prevalence of 58.8%, 6.7% and 12.5% in the Northern, Middle and Coastal zones, respectively. In the multivariate analysis, rural households (p<0.001), households with more than five members (p<0.001), households with heads less than 25 years (p=0.018), male-headed households (p<0.001) and household heads with no/low level of education (p<0.001) were significantly associated with drinking unimproved water. Also, rural households (p=0.002), households in the Northern zone (p<0.001), single-member households (p<0.001), households with heads less than 25 years (p<0.001) and household heads with no/low level of education (p<0.001) were significantly associated with using unimproved toilet facilities.ConclusionThe target of universal access to safe drinking water by 2025 and elimination of open defecation by 2030 seems impossible to be achieved if appropriate measures are not implemented. We recommend that state authorities, health partners and non-governmental organisations support local-level sanitation plans and strategies.