If a unit moves to an empty battlefield, is it considered as attacking?

No, a unit moving to an empty battlefield is not considered to be attacking.

According to FAQ #5513 and FAQ #8664, units moving to an empty battlefield are not considered attackers, and the unit does not receive the "Attacker" designation.

Here is the breakdown of why this is the case:

  • Combat is required for Attacker designation: Attacker and defender designations only exist during Combat. As stated in Rule 437 and Rule 440, Combat can only occur between units controlled by opposing players at the same battlefield.
  • Empty battlefields create a Showdown, not Combat: When a unit moves to an empty battlefield, it initiates a non-combat Showdown (Rule 429.1). Because there is no opposing unit present to create a Combat, your unit does not gain the "Attacker" designation.
  • Triggered Abilities: Because the unit is not designated as an attacker, "When I attack" triggers will not activate (as confirmed in FAQ #2505 and FAQ #8664). Similarly, passive abilities like Assault will not provide their might bonus because the unit is not an attacker (FAQ #863 and FAQ #1818).