The interfaces between different materials in multisegmented nanowires act as pinning centers for domain walls, making these nanowires attractive materials for 3D memory devices. Here, the switching events which accompany a domain wall pinning and depinning in two-segmented Co/Ni nanowires with 80 nm in diameter have been simulated for various segment lengths, using the MAGPAR package within the Virtual Micromagnetics environment. Different switching mechanisms of the magnetization were found for nanowires with different segment lengths, contributing to different values of the pinning and depinnning fields. Domain wall pinning is caused by the stray field from the Co segment; therefore, the position of the pinned domain wall depends on the cobalt segment’s length: in case of the smaller segment lengths, the domain wall is pinned at the interface itself, whereas in case of 700 nm segments a 150 nm displacement of the pinned domain wall from the interface is found, consistent with experimental reports. Domain wall pinning is manifested as a plateau in the magnetization curve. In case of nanowires with shorter segments, another plateau is observed that is related to the creation of a magnetic vortex structure. These findings are crucial towards determining the minimum segment length to achieve a higher bit density that displays optimal pinning and depinning fields.