Castex "immediately carried out a PCR test" after finding out that one of his daughters had tested positive, his office said.
Castex had been in Brussels on Monday morning, where he met his Belgian counterpart Alexander De Croo.
He was accompanied on the trip by several other senior colleagues, including France's Interior Minister Gerard Darmanin and Europe Minister Clement Beaune.
The 56-year-old head of government received two doses of vaccine in the spring and had never tested positive before.
President Emmanuel Macron and his wife Brigitte both contracted the disease last year.