The notion of absorption was developed a few years ago by Barto and Kozik and immediately found many applications, particularly in topics related to the constraint satisfaction problem. We investigate the behavior of absorption in semigroups and n-ary semigroups (that is, algebras with one n-ary associative operation). In the case of semigroups, we give a simple necessary and sufficient condition for a semigroup to be absorbed by its subsemigroup. We then proceed to n-ary semigroups, where we conjecture an analogue of this necessary and sufficient condition, and prove that the conjectured condition is indeed necessary and sufficient for B to absorb A (where A is an n-ary semigroup and B is its n-ary subsemigroup) in the following three cases: when A is commutative, when |A-B|=1 and when A is an idempotent ternary semigroup.