Consequences of heat stress during pregnancy can affect the normal development of the offspring. In the present experiment, 30 Murciano-Granadina dairy goats (41.8 ± 5.7 kg) were exposed to 2 thermal environments varying in temperature-humidity index (THI) from 12 days before mating to 45 days of gestation. The environmental conditions were: gestation under thermal-neutral (TN; THI = 71 ± 3); and gestation under heat stress (HS; THI = 85 ± 3) conditions. At 27 ± 4 days old, female kids exposed to in utero TN (IUTN; n = 16) or in utero HS (IUHS; n = 10) were subjected to 2 tests: arena test (AT) and novel object test (NOT), the latter was repeated at 3 months of age. Additionally, 8 months after birth, a subset of IUTH and IUHS growing goats (n = 8 each; 16.8 ± 3.4 kg BW) were exposed to 2 environmental conditions in 2 consecutive periods: a basal thermal-neutral period (THI = 72 ± 3) for 7 days, and a heat-stress period (THI = 87 ± 2) for 21 days. In both periods, feeding, resting, posture, and thermally-associated behaviors were recorded. The gestation length was shortened by 3 days in GHS goats. In the AT, IUHS kids showed a lower number of sniffs (P < 0.01) compared to IUTN. In the NOT, IUHS kids also tended to show a lower number of sniffs (P = 0.09). During heat exposure, IUTN and IUHS growing goats spent more time resting and exhibited more heat-stress related behaviors such as panting and drinking (P < 0.001); however, no differences were observed between both groups. In conclusion, heat stress during the first third of pregnancy shortened gestation length and influenced the exploratory behavior of the kids in the early life. However, behavior responses to heat stress during the adulthood were not affected by the in utero thermal treatment.