A search for the supersymmetric partners of the Standard Model bottom and top quarks is presented. The search uses 36.1 fb−1 of pp collision data at s√=13s=13 TeV collected by the ATLAS experiment at the Large Hadron Collider. Direct production of pairs of bottom and top squarks (b¯¯1b¯1 and t¯1t¯1) is searched for in final states with b-tagged jets and missing transverse momentum. Distinctive selections are defined with either no charged leptons (electrons or muons) in the final state, or one charged lepton. The zero-lepton selection targets models in which the b¯¯1b¯1 is the lightest squark and decays via b¯¯1→bχ¯¯¯01b¯1→bχ¯10, where χ¯¯¯01χ¯10 is the lightest neutralino. The one-lepton final state targets models where bottom or top squarks are produced and can decay into multiple channels, b¯¯1→bχ¯¯¯01b¯1→bχ¯10 and b¯¯1→tχ¯¯¯±1b¯1→tχ¯1±, or t¯1→tχ¯¯¯01t¯1→tχ¯10 and t¯1→bχ¯¯¯±1t¯1→bχ¯1±, where χ¯¯¯±1χ¯1±is the lightest chargino and the mass difference mχ¯¯¯¯±1−mχ¯¯¯¯01mχ¯1±−mχ¯10 is set to 1 GeV. No excess above the expected Standard Model background is observed. Exclusion limits at 95% confidence level on the mass of third-generation squarks are derived in various supersymmetry-inspired simplified models.